標籤:ref 布爾 定義 span 目標 bar win window content
一、window
1.瀏覽器視窗與頁面各部分尺寸
2.間歇調用與逾時調用
setInterval(function,time(以毫秒計)) 返回:時間Id號(為clearInterval(timeId)方法提供標識記號)
clearInterval(timeId); //取消間歇調用
setTimeout(function,time(以毫秒計)) 返回:時間Id號(為clearTimeout(timeId)方法提供標識記號)
clearTimeout(timeId); //取消逾時調用
3.導航與開啟視窗
window.open(args)://導航到一個特定的URL,也可以開啟新的瀏覽器視窗
第一個參數:要載入的URL
第二個參數:視窗目標
第三個參數:一個特性字串[height,width,left,menubar,resizable,scrollbars,status,toolbar,top]
第四個參數:新頁面是否取代瀏覽器記錄中當前載入頁面的布爾值
//<a href="www.baidu.com" target="topFrame">
//www.baidu.com:<p id="topFrame">text content</p>
Eg:window.open("www.baidu.com","topFrame","height=400,width=400,top=10,left=10,resizable=yes");
window.opener:
1.儲存著開啟它的原始視窗對象。這個屬性只在快顯視窗的最外層window對象(top)中有定義,而且指向調用window.open()的視窗或架構。
window.opener == window[true]
2.將opener屬性設定為null,就是告訴瀏覽器新建立的標籤頁不需要與開啟它的標籤頁通訊,因此:可以在獨立的進行中運行。標籤頁一旦切斷,將無法恢複
window.close():關閉當前頁面【理論上:僅僅限制於:用open方法開啟的視窗】
window.closed:返回一個布爾值:是否關閉
JavaScript之BOM五大對象(window;location;navigator;screen;history)