<SCRIPT LANGUAGE="JavaScript">
<!--
//document.body.scrollTop 滚动条的上端距离
//document.body.scrollLeft 滚动条的左端距离 window.onload = function() { 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>

js获取网页屏高 屏宽的更多相关文章

  1. JS获取网页宽高方法集合

    JS获取网页宽高等方法的集合:document.body.clientWidth - 网页可见区域宽document.body.clientHeight - 网页可见区域高 document.body ...

  2. JS获取网页属性包括宽、高等

    JS获取网页属性包括宽.高等. function getInfo()  { // www.jbxue.com var s = "";  s += " 网页可见区域宽:&q ...

  3. 关于Chrome(谷歌浏览器)对docume,准确获取网页客户区的宽高、滚动条宽高、滚动条Left和Top

    对于document.compatMode,很多朋友可能都根我一样很少接触,知道他的存在却不清楚他的用途.今天在ext中看到 document.compatMode的使用,感觉这个对于我们开发兼容性的 ...

  4. js获取网页的各种高度

    原文:js获取网页的各种高度 网页可见区域宽: document.body.clientWidth网页可见区域高: document.body.clientHeight网页可见区域宽: documen ...

  5. js技术要点---JS 获取网页源代码

    JS 获取网页源代码 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html& ...

  6. JS获取IMG图片高宽

    前段时间在LJW写的touchslider.js轮播代码里添加自适应屏幕大小的功能时,遇到一个问题.不管用什么样的方法都无法获取到IMG标签的高宽,最后只有给图片定一个高宽的比例值:趁今天有空我就写了 ...

  7. javascript获取网页各种高宽及位置总结

    screen对象 获取屏幕的高宽(分辨率) screen.width //屏幕的宽 screen.height //屏幕的高 screen.availWidth //屏幕可用宽度 屏幕的像素高度减去系 ...

  8. js 获取 网页屏幕高度 窗口高度 元素高度 滚动高度

    常用: JS 获取浏览器窗口大小 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 // 获取窗口宽度 if (window.innerWidth) winWidth = ...

  9. (知识点)JS获取网页高度

    网页可见区域的宽:document.body.clientWidth 网页可见区域的高:document.body.clientHeight 网页可见区域的宽:document.body.offset ...

随机推荐

  1. 利用zk客户端删除solr shard

    进入zk客户端 ./bin/zkCli.sh -server ip:2181 显示所有的内容: ls / 删除数据: rmr /filename path

  2. adb shell top 使用

    adb shell top 一.其中相关参数: >adb shell top -h  Usage: top [ -m max_procs ] [ -n iterations ] [ -d del ...

  3. 02->交互式图形学--用glut库实现Sierpinski镂垫

    Sierpinski图形是一类有趣的图形,本文结合交互式图形学教材,讲解Sierpinski镂垫图形生成,作为入门图形学编程的第一课.为了简便,本文就2D来进行讨论.实验环境见01 算法 主要是根据随 ...

  4. 2019-8-31-dotnet-数组自动转基类数组提示-Co-variant-array-conversion-是什么问题

    title author date CreateTime categories dotnet 数组自动转基类数组提示 Co-variant array conversion 是什么问题 lindexi ...

  5. postgresql使用pg_dump和pg_restore 实现跨服务器的数据库迁移或备份

    因为业务需求,需要将服务器上的postgre多个数据库的数据整个库得迁移到另一个postgre数据库上. 一般表较少时,会使用postgre 的copy to 和 copy from 命令就能完成表的 ...

  6. js实现F5键刷新后菜单保持之前状态以及监听F5页面刷新子iframe 而父页面不刷新

    利用layui实现菜单效果时,刷新页面仍回到首页状态,需要 实现iframe子页面刷新父元素不刷新,下面是代码 //刷新时禁用F5的默认事件 $(document).keydown(function ...

  7. 1001CSP-S模拟测试赛后总结

    祖国七十岁生日快乐!!! 话说在国庆节这天考试…… 临时换座换到了某诺和yzh中间.两边都是大佬紧张一批. 加上迟到了两分钟,加上昨晚熬夜写实践报告,状态并不是特别好. 这套题稍简单.于是尽管我T1A ...

  8. DELPHI实现类似仿360桌面的程序界面

    1.窗体半透明: Alphablend属性为true;Alphablendvalue的值为100 2.窗体透明: formCreate: Self.TransparentColor := True;S ...

  9. AmqpException: No method found for class java.lang.String

    amqpTemplate发送消息用的String,接收消息用的Message,统一消息类型就可以

  10. iOS开发之SceneKit框架--SCNView.h

    1.SCNView 在macOS中,SCNView是NSView的子类,在iOS和tvOS中,SCNView是UIView的子类.SCNView用于显示SceneKit的3D场景,而需要设置场景的相关 ...