Javascript中获取url地址的问题。

执行 用javascript获取url网址信息:


window.location.host=www.xxx.com
window.location.hostname  
=www.xxx.com
window.location.href 
= www.xxx.com/a/a.aspx
window.location.pathname
=/a/a.aspx
window.location.protocol
=http:


原文地址:https://www.cnblogs.com/lfzwenzhu/p/1754789.html