location

http://example.com:1234/test.htm#part2

location.hash    #part2
location.port    1234
http://www.w3school.com.cn/tiy/t.asp?f=hdom_loc_search
location.search                  ?f=hdom_loc_search


location.host example.com:1234

location.hostname example.com

location.protocol  http:

location.href      http://example.com:1234/test.htm#part2

  

 

posted @ 2017-08-16 16:06  高中国流  阅读(171)  评论(0编辑  收藏  举报