惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 单车骑客

安装vs2005 sp1 出现错误1718,文件未通过数字签名检查,解决方法 HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解(转载) 为新闻标题加颜色 - 单车骑客 - 博客园 GridView中如何做删除提示信息 GridView绑定多个参数值 - 单车骑客 - 博客园 Url重写 解决“不重新发送信息,则无法刷新新网页”的方案 - 单车骑客 - 博客园 powerdesigner将PDM转换到OOM时,code与name同时同步转换 Powerdesgner数据模型设计中,属性名同名问题的解决方法 正则表达式30分钟入门教程(转) asp.net页面生命周期 用js删除表中一行 存储过程中如何处理分页 SQL函数:分离字符串,并返回分离后字符的表 提供一个获取高精度时间类(转) SQL2005如何进行分页?? SQL中,内连接,外连接的书写格式 javascript正则表达式 下拉菜单
scrollWidth,clientWidth等区别
单车骑客 · 2008-08-19 · via 博客园 - 单车骑客

scrollWidth是对象的实际内容的宽,不包边线宽度,会随对象中内容的多少改变(内容多了可能会改变对象的实际宽度) 

clientWidth是对象可见的宽度,不包滚动条等边线,会随窗口的显示大小改变。

offsetWidth是对象的可见宽度,包滚动条等边线,会随窗口的显示大小改变。

scrollHeight: 获取对象的滚动高度。

offsetHeight:获取对象相对于版面或由父坐标  

scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离

offsetLeft:获取对象相对于版面或由

scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离

offsetTop 属性指定的父坐标的计算顶端位置

offsetParent 属性指定的父坐标的高度

offsetParent 属性指定的父坐标的计算左侧位置

event.clientX 相对文档的水平座标

event.clientY 相对文档的垂直座标

event.offsetX 相对容器的水平坐标

event.offsetY 相对容器的垂直坐标

document.documentElement.scrollTop 垂直方向滚动的值 event.clientX+document.documentElement.scrollTop 相对文档的水平座标+垂直方向滚动的量   

以上主要指IE之中,FireFox差异如下:

IE6.0、FF1.06+:

clientWidth = width + padding clientHeight = height + padding

offsetWidth = width + padding + border

offsetHeight = height + padding + border

IE5.0/5.5:

clientWidth = width - border

clientHeight = height - border

offsetWidth = width

offsetHeight = height