window對象的重要屬性

  1. closed   只有當窗口關閉時他才爲true,其餘時候是false、html

  2. defaultStatus   status    瀏覽器狀態欄顯示的文本數組

  3. document 文檔對象模型,對Document對象的引用,表明窗口中顯示的html文檔瀏覽器

  4. frames  window對象的數組,表明窗口中的各個框架app

  5. history  對History對象的引用,表明用戶瀏覽窗口的歷史框架

  6. location 對Location 對象的引用,表明窗口中顯示文檔的url地址url

  7. name 窗口的名稱,可被a的target屬性使用spa

  8. opener 對打開當前窗口的window對象的引用,若是當前窗口被用戶打開,則他的值爲nullorm

  9. parent 父窗口htm

  10. self 對當前Window對象的引用,與window同義對象

  11. top 當窗口多層嵌套時,表明頂級窗口

  12. window自引用屬性,對當前Window對象的引用

  13. navigator: appName appVersion userAgent appCodeName platform

方法:

    1.alert() confirm() prompt()

    2. close() 關閉窗打開的窗口

    3.focus() blur()

    4.moveBy() moveTo()

    5.open()打開新的頂級窗口

    6.print()打印網頁內容

    7.resizeBy() resizeTo()

    8.scrollBy() scroolTo()

    9.setInterval() clearInterval()

    10.setTimeout() clearTimeout()

相關文章
相關標籤/搜索