アドレス情報 Location

◆window.location.xxxxxx
href の値が "http://www.example.com:2096/aaa/index.cgi?key=pc#home" のとき、各xxxxxxの値は以下のようになる。

protocol: "http:"
・host:     "www.example.com:2096"
・hostname: "www.example.com"
・port:     "2096"
・pathname: "/aaa/index.cgi"
・search:   "?key=pc"
・hash:     "#home"