javascript獲得當(dāng)前的信息的一些常用命令
本文內(nèi)容很簡(jiǎn)單,給大家總結(jié)一下javascript獲得當(dāng)前的信息的一些常用命令
console.info("document.URL=" + document.URL);
console.info("document.location.href=" + document.location.href);
//console.info("document.base=" + document.base); //這是錯(cuò)的!
console.info("document.location=" + document.location);
console.info("self.location.href=" + self.location.href);
console.info("top.location.href=" + top.location.href);
console.info("location.hostname=" + location.hostname);
console.info("window.location.host=" + window.location.host);
console.info("window.location.pathname=" + window.location.pathname);
暫時(shí)想起來(lái)的就這些啦,后續(xù)再更新^_^
相關(guān)文章
javascript之Boolean類(lèi)型對(duì)象
本文主要介紹javascript中的Boolean類(lèi)型對(duì)象,Boolean對(duì)象非常簡(jiǎn)單,卻非常有用,希望能給大家做一個(gè)參考。2016-06-06
Javascript學(xué)習(xí)筆記9 prototype封裝繼承
在上文中,我利用prototype的原理做了一個(gè)封裝的New,然后我就想到,我是否可以用prototype的原理進(jìn)一步封裝面向?qū)ο蟮囊恍┗咎卣髂兀勘热缋^承。2010-01-01
淺談js和css內(nèi)聯(lián)外聯(lián)注意事項(xiàng)
下面小編就為大家?guī)?lái)一篇淺談js和css內(nèi)聯(lián)外聯(lián)注意事項(xiàng)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-06-06
關(guān)于javascript中的parseInt使用技巧
前面好幾次遇到JavaScript中parseInt函數(shù)把字串轉(zhuǎn)為數(shù)字,前面遇到過(guò)幾次問(wèn)題,然后就換其它方法進(jìn)行比較。2009-09-09

