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