Screen height 属性
最后更新于:2022-03-26 22:11:08
Screen height 属性
Screen 对象
定义和用法
height 属性声明了显示浏览器的屏幕的高度,以像素计。
语法
浏览器支持





所有主要浏览器都支持 height 属性
实例
实例
返回你的屏幕的总高度:
<script>
document.write(“总高度: ” + screen.height);
</script>
以上实例输出结果:
尝试一下 »
更多实例
本例包含了所有的 screen 属性。
Screen 对象