国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

Window innerWidth 和 innerHeight 屬性

2018-10-18 15:44 更新

Window innerWidth innerHeight 屬性

Window 對象參考手冊 Window 對象

定義和用法

innerheight 返回窗口的文檔顯示區(qū)的高度。

innerwidth 返回窗口的文檔顯示區(qū)的寬度。

注意:使用 outerWidth 和 outerHeight 屬性獲取加上工具條與滾動條窗口的寬度與高度。


語法

Get:

window.innerWidth
window.innerHeight

設(shè)置:

window.innerWidth=pixels
window.innerHeight=pixels


瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持 innerWidth 和 innerHeight 屬性。

注意:IE 8 及更早 IE版本不支持這兩個屬性。


實(shí)例

實(shí)例

獲取窗口的高度與寬度(不包含工具條與滾動條):

var w=window.innerWidth;
var h=window.innerHeight;

嘗試一下 ?


Window 對象參考手冊 Window 對象


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號