javascript得到浏览的可用高度
来源:互联网 发布:linux查看目录 编辑:程序博客网 时间:2024/06/06 02:50
1.第一个页面 max1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>MaxHeight setting </title><script type="text/javascript"> function screenInfo(){ var s = ""; s += "\r\n网页可见区域宽:"+ document.body.clientWidth; s += "\r\n网页可见区域高:"+ document.body.clientHeight; s += "\r\n网页可见区域宽:"+ document.body.offsetWidth +" (包括边线的宽)"; s += "\r\n网页可见区域高:"+ document.body.offsetHeight +" (包括边线的宽)"; s += "\r\n网页正文全文宽:"+ document.body.scrollWidth; s += "\r\n网页正文全文高:"+ document.body.scrollHeight; s += "\r\n网页被卷去的高:"+ document.body.scrollTop; s += "\r\n网页被卷去的左:"+ document.body.scrollLeft; s += "\r\n网页正文部分上:"+ window.screenTop; s += "\r\n网页正文部分左:"+ window.screenLeft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的宽:"+ window.screen.width; s += "\r\n屏幕可用工作区高度:"+ window.screen.availHeight; s += "\r\n屏幕可用工作区宽度:"+ window.screen.availWidth; s+="\r\n 网页的可见高度:"+top.document.documentElement.clientHeight; s+="\r\n 网页的可见宽度:"+top.document.documentElement.clientWidth; alert(s);}</script> </head><body> <input type="button" onclick="screenInfo()" value='计算屏幕参数'/> <iframe style="background:#33FF33;width:400px;height:400px;" > </iframe></body></html>
2.第一个页面 max2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>MaxHeight setting </title><script type="text/javascript"> function screenInfo(){ var s = ""; s += "\r\n网页可见区域宽:"+ document.body.clientWidth; s += "\r\n网页可见区域高:"+ document.body.clientHeight; s += "\r\n网页可见区域宽:"+ document.body.offsetWidth +" (包括边线的宽)"; s += "\r\n网页可见区域高:"+ document.body.offsetHeight +" (包括边线的宽)"; s += "\r\n网页正文全文宽:"+ document.body.scrollWidth; s += "\r\n网页正文全文高:"+ document.body.scrollHeight; s += "\r\n网页被卷去的高:"+ document.body.scrollTop; s += "\r\n网页被卷去的左:"+ document.body.scrollLeft; s += "\r\n网页正文部分上:"+ window.screenTop; s += "\r\n网页正文部分左:"+ window.screenLeft; s += "\r\n屏幕分辨率的高:"+ window.screen.height; s += "\r\n屏幕分辨率的宽:"+ window.screen.width; s += "\r\n屏幕可用工作区高度:"+ window.screen.availHeight; s += "\r\n屏幕可用工作区宽度:"+ window.screen.availWidth;<span style="font-size:14px;color:#ff6666;"> <strong> s+="\r\n 网页的可见高度:"+top.document.documentElement.clientHeight; s+="\r\n 网页的可见宽度:"+top.document.documentElement.clientWidth;</strong></span> alert(s);}</script> </head><body> <input type="button" onclick="screenInfo()" value='计算屏幕参数'/> <iframe style="background:#33FF33;width:400px;height:400px;" > </iframe></body></html>
0 0
- javascript得到浏览的可用高度
- 用javascript得到网页的实际高度
- Javascript中得到各种高度的方法
- javascript 各种得到浏览器宽度和高度的函数
- javascript 各种得到浏览器宽度和高度的函数
- javascript 判断浏览器 和 得到浏览器的宽度、高度
- 得到任务栏的高度
- 得到屏幕的高度
- 得到PopupWindow的高度
- android 得到字体的高度
- Android得到状态栏的高度
- android得到控件的高度
- javascript的图片浏览
- java 得到磁盘的可用空间
- java 得到磁盘的可用空间
- VC得到可用的串口列表
- 得到页面body区域内容的高度
- [XtraGrid] 得到列标题行的高度
- php SOAP之多层complex类型
- android中实现截屏的三种思路
- android listview divider padding
- SurfaceView和view分别实现触摸轨迹
- 喷水装置 ACM题目 京东16招聘编程题(贪心算法)
- javascript得到浏览的可用高度
- 秒杀多线程第三篇 原子操作 Interlocked系列函数
- redis使用(二):五种键值类型
- 黑马程序员-----java基础(多线程)
- Android进阶之数据存储+Preferences
- opencv7-ml之统计模型
- 二维数组中行最大值中的最小值
- 动态选路协议
- CoCreateInstance of OLE control failed