关于Location属性和方法的差异对比

location

location.host 跟location.hostname 的区别

统一url
http://cp01-hj-lh-frontend-06.epc.baidu.com:8080/f?ie=utf-8&kw=%E5%95%86%E4%B8%9A&fr=search

location.host 
    return  http://cp01-hj-lh-frontend-06.epc.baidu.com:8080
location.hostname  
    return http://cp01-hj-lh-frontend-06.epc.baidu.com

你可能感兴趣的:(关于Location属性和方法的差异对比)