js 如何获取浏览器的高度?
2015-07-16 13:04
399 查看
<SCRIPT LANGUAGE="JavaScript"><!-- var s = ""; s += " 网页可见区域宽:"+ document.body.clientWidth; s += " 网页可见区域高:"+ document.body.clientHeight; s += " 网页可见区域宽:"+ document.body.offsetWidth + " (包括边线和滚动条的宽)"; s += " 网页可见区域高:"+ document.body.offsetHeight + " (包括边线的宽)"; s += " 网页正文全文宽:"+ document.body.scrollWidth; s += " 网页正文全文高:"+ document.body.scrollHeight; s += " 网页被卷去的高(ff):"+ document.body.scrollTop; s += " 网页被卷去的高(ie):"+ document.documentElement.scrollTop; s += " 网页被卷去的左:"+ document.body.scrollLeft; s += " 网页正文部分上:"+ window.screenTop; s += " 网页正文部分左:"+ window.screenLeft; s += " 屏幕分辨率的高:"+ window.screen.height; s += " 屏幕分辨率的宽:"+ window.screen.width; s += " 屏幕可用工作区高度:"+ window.screen.availHeight; s += " 屏幕可用工作区宽度:"+ window.screen.availWidth; s += " 你的屏幕设置是 "+ window.screen.colorDepth +" 位彩色"; s += " 你的屏幕设置 "+ window.screen.deviceXDPI +" 像素/英寸"; alert (s);//--> </SCRIPT>
相关文章推荐
- Servlet&JSP思维导图
- 小折腾:JavaScript与元素间的抛物线轨迹运动
- jsoup解析的常见用法
- 用JS 这些实现左右滑动 上下滑动
- jstl jsp long to date
- javascript的BOM汇总
- EXTJS 4.2 添加滚动条
- JSP打入jar包
- JSP打入jar包
- JS 加载html 在IE7 IE8下 可调试
- javascript 继承与原型继承用法详解
- 理解js中的原型链,prototype与__proto__的关系
- js实现下拉框‘省’,‘市’加载
- 自定义JSP中的Taglib标签之自定义标签中的Function函数
- (new)new的作用到底是什么?
- JScharts快速入门
- js显示json数据
- 数据模拟-mock.js
- JavaScript经典代码总结
- js删除指定行