js获取当前页面的网址域名地址

1.获取当前完整网址
thisURL = document.URL;
thisHREF = document.location.href;
thisSLoc = self.location.href;
thisDLoc = document.location;
strwrite = ” thisURL: [” + thisURL + “]”
strwrite += ” thisHREF: [” + thisHREF + “]”
strwrite += ” thisSLoc: [” + thisSLoc + “]”
strwrite += ” thisDLoc: [” + thisDLoc + “]”
document.write( strwrite );
继续阅读js获取当前页面的网址域名地址