Javascript中window對象簡介__Java

來源:互聯網
上載者:User

1、簡介

        Window 對象表示瀏覽器中開啟的視窗。
        如果文檔包含架構(frame 或 iframe 標籤),瀏覽器會為 HTML 文檔建立一個 window 對象,並為每個架構建立一個額外的 window 對象。

        沒有應用於 window 對象的公開標準,不過所有瀏覽器都支援該對象。


2、Window對象集合

        IE: Internet Explorer, F: Firefox, O: Opera.

集合 描述 IE F O
frames[]

返回視窗中所有命名的架構。

該集合是 Window 對象的數組,每個 Window 對象在視窗中含有一個架構或 <iframe>。屬性 frames.length 存放數組 frames[] 中含有的元素個數。注意,frames[] 數組中引用的架構可能還包括架構,它們自己也具有 frames[] 數組。

4 1 9

3、Window 對象屬性

屬性 描述 IE F O
closed 返回視窗是否已被關閉。 4 1 9
defaultStatus 設定或返回視窗狀態列中的預設文本。 4 No 9
document 對 Document 對象的唯讀引用。 4 1 9
history 對 History 對象的唯讀引用。 4 1 9
innerheight 返回視窗的文檔顯示區的高度。 No No No
innerwidth 返回視窗的文檔顯示區的寬度。 No No No
length 設定或返回視窗中的架構數量。 4 1 9
location 用於視窗或架構的 Location 對象。 4 1 9
name

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.