Screen availHeight 屬性

定義和用法
availHeight 屬性聲明了顯示瀏覽器的屏幕的可用高度,以像素計。在 Windows 這樣的操作系統(tǒng)中,這個可用高度不包括分配給半永久特性(如屏幕底部的任務(wù)欄)的垂直空間。
語法
screen.availHeight
瀏覽器支持
所有主要瀏覽器都支持 availHeight 屬性
實例
實例
返回屏幕的可用高度:
<script>
document.write("可用高度: " + screen.availHeight);
</script>
document.write("可用高度: " + screen.availHeight);
</script>
以上實例輸出結(jié)果:
document.write("可用高度: " + screen.availHeight);
嘗試一下 ?

更多實例

更多建議: