Screen availHeight 属性
页面下方有更多实例。
定义和用法
availHeight 属性返回用户屏幕的高度(以像素为单位),减去Windows任务栏等界面功能。
提示: 要获取屏幕宽度(不包括Windows任务栏),请使用 availWidth 属性。
浏览器支持
属性 | |||||
---|---|---|---|---|---|
availHeight | Yes | Yes | Yes | Yes | Yes |
语法
screen.availHeight
技术细节
返回值: | 数值,表示用户屏幕的高度,以像素为单位 |
---|
更多实例
实例
所有屏幕属性:
var txt = "";
txt += "<p>Total width/height: " + screen.width + "*" + screen.height + "</p>";
txt += "<p>Available width/height: " + screen.availWidth + "*" + screen.availHeight + "</p>";
txt += "<p>Color depth: " + screen.colorDepth + "</p>";
txt += "<p>Color resolution: " + screen.pixelDepth + "</p>";
亲自试一试 »
txt += "<p>Total width/height: " + screen.width + "*" + screen.height + "</p>";
txt += "<p>Available width/height: " + screen.availWidth + "*" + screen.availHeight + "</p>";
txt += "<p>Color depth: " + screen.colorDepth + "</p>";
txt += "<p>Color resolution: " + screen.pixelDepth + "</p>";
❮ Screen 对象