javascript document與window對象詳細說明(1/3)

來源:互聯網
上載者:User

一、window對象
  -------------------------------------------------- -------------------   
  對象屬性
  window //窗戶自身
  window.self //引用本窗戶window=window.self
  window.name //為窗戶命名
  window.defaultstatus //設定窗戶狀態列資訊
  window.location //url地址,配備布置這個屬性可以開啟新的頁面
  -------------------------------------------------- -------------------
  對象方法
  window.alert("text") //提示資訊會話框
  window.confirm("text") //確認會話框
  window.prompt("text") //要求鍵盤輸入會話框
  window.setintervel("action",time) //每一隔指定的時間(毫秒)就執行一次操作
  window.clearinterval() //清除時間配備布置作用就是終止輪迴
  window.settimeout(action,time) //隔了指定的時間(毫秒)執行一次操作
  window.open() //開啟新的窗戶
  window.close() //關閉窗戶
  -------------------------------------------------- -------------------
  成員對象
  window.event
  window.document //見document對象詳解
  window.history
  window.screen
  window.navigator
  window.external
  -------------------------------------------------- -------------------
  window.history對象
  window.history.length //瀏覽過的頁面數
  history.back() //撤退退卻
  history.forward() //進步
  history.go(i) //前進或頭退到記錄的第i個頁面
  //i>0進步,i<0撤退退卻
  -------------------------------------------------- -------------------
  window.screen對象
 window.screen.width //螢幕寬度
  window.screen.height //螢幕高度
  window.screen.colordepth //螢幕色深
  window.screen.availwidth //可用寬度
  window.screen.availheight //可用高度(除去工作列的高度)
  -------------------------------------------------- -------------------
  window.external對象
  window.external.addfavorite("地址","標題" ) //把網站新增到保藏夾
  -------------------------------------------------- -------------------
  window.navigator對象
  window.navigator.appcodename //瀏覽器代碼名
  window.navigator.appname //瀏覽器步伐名
  window.navigator.appminorversion //瀏覽器補釘版本
  window.navigator.cpuclass //cpu類型 x86
  window.navigator.platform //操作體系類型 win32
  window.navigator.plugins
  window.navigator.ops教程profile
  window.navigator.userprofile
  window.navigator.systemlanguage //客戶體系語言 zh-cn簡體中文
  window.navigator.userlanguage //使用者語言,同上
  window.navigator.appversion //瀏覽器版本(包括 體系版本)
  window.navigator.useragent
  window.navigator.online //使用者否線上
  window.navigator.cookieenabled //瀏覽器是否撐持cookie
  window.navigator.mimetypes
  ==================================================

首頁 1 2 3 末頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.