client,offset,scroll,style,margin,padding
<head>
<title>51windows.Net </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
</style>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
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;
alert(s);
</SCRIPT>
</body>
</html>
<head>
<title>51windows.Net </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
</style>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
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;
alert(s);
</SCRIPT>
</body>
</html>
来自: http://hi.baidu.com/qqlm/blog/item/210e47a9d515d7fc1e17a21b.html
分享到:
相关推荐
05-offset,scroll,client.html
在本篇文章里小编给大家整理了关于js 元素offset,client , scroll 三大系列总结,有需要的朋友们可以学习下。
client和scroll应用; 元素可视区client;Client和scrool应用;Client和scrool应用;Client和scrool应用; 元素滚动scroll;Client和scrool应用;Client和scrool应用;Client和scrool应用;浮动广告设计;如何在页面上方显示...
在学习前端的过程中,我们经常会碰到offset, client与scroll,所以我就把它们称作为‘三剑客’。 01 offset – 偏移量 定义:元素在屏幕上占用的所有的可见的空间。 元素可见的大小由其高度、宽度决定,包括所有内...
HTML元素有几个offset、client、scroll开头的属性,总是让人摸不着头脑。在书中看到记下来,分享给需要的小伙伴。主要是以下几个属性: 第一组:offsetWidth,offsetHeight,offsetLeft,offsetTop,offsetParent 第...
javascript的offset、client、scroll在使用过程中非常频繁,接下来将对此进行一一介绍,需要了解的朋友可以详细参考下
Like android's scroll bars. 像android的滚动条。Forked from onlywsx's extension. 移植自onlywsx的原扩展 Like a scroll bar in the android, activity display the scroll bar, usually when they don't show, ...
主要介绍了JS前端知识点offset,scroll,client,冒泡,事件对象的应用,结合实例形式总结分析了offset,scroll,client,冒泡,事件对象相关功能、原理及操作注意事项,需要的朋友可以参考下
.scrollStyle{ width: 100%; height: 100%; display: flex; flex-direction: column; } 居然无效,修改height为具体高度也无效. 然后我在 style里设置height为200px,居然生效了: <scroll
View滑动效果常用属性详解:scroll、translation、LayoutParams代码 http://blog.csdn.net/Holmofy/article/details/53959511
本课将带你学习前端开发中最重要的技术JavaScript,它是网页与用户进行交互的基石。...最后我们还会学习Jquery框架,以提高你的前端开发效率。学完本课后,你将能独立做出与用户有复杂交互(表单、动画、视频等)的网站...
失效的scroll-x 在微信小程序的文档中,使用scroll-view标签,然后给它设置一个scroll-x就可以实现元素,横向排列,可以左右滑动。。。。 然而,在实际开发中,发现并不是这么简单。。。贴上部分wxml和wxss代码… ...
smoothScroll.js 是极小的,符合标准的平滑滚动脚本,无依赖,支持 Firefox, Chrome, IE10, Opera 和 Safari。使用:[removed][removed]示例:var smoothScroll = require('smoothscroll'); var exampleBtn = ...
jquery-liMarquee-scroll-style-codes(jb51.net).rar jquery-多风格多功能滚动特效插件-jquery.liMarquee.js-源码
js中的scroll和offset 使用比较的实例与分析.docx
网页元素位置(scroll、client、offsetWidth等)获取、设置详解
jquery endlessEndless Scroll.rar jquery endlessEndless Scroll.rar