clientX, clientY,offsetX, offsetY,screenX, screenY, x, y
来源:互联网 发布:阿里云ecs 数据盘挂载 编辑:程序博客网 时间:2024/04/28 16:37
clientX, clientY是鼠标当前相对于网页的位置,当鼠标位于页面左上角时clientX=0, clientY=0;
offsetX, offsetY是鼠标当前相对于网页中的某一区域的位置,当鼠标位于页面中这一区域的左上角时offsetX=0, offsetY=0;
screenX, screenY是相对于用户显示器的位置
x,y是鼠标相对于当前浏览器的位置
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>Measure for Measure</TITLE>
<SCRIPT>
<!--
function one() {
report.value = "The DIV above is relatively positioned in the BODY. The style object contains the information that was set in the inline style to position this object. The following are the values that would be reported for the various position and dimension properties on the style object for the DIV:" + "/n/n";
report.value= report.value + " mydiv.style.top (string) = " + foodiv.style.top + "/n";
report.value= report.value + " mydiv.style.left (string) = " + foodiv.style.left + "/n";
report.value= report.value + " mydiv.style.height (string) = " + foodiv.style.height + "/n";
report.value= report.value + " mydiv.style.width (string) = " + foodiv.style.width + "/n";
report.value= report.value + " mydiv.style.pixelTop (long) = " + foodiv.style.pixelTop + "/n";
report.value= report.value + " mydiv.style.pixelLeft (long) = " + foodiv.style.pixelLeft + "/n";
report.value= report.value + " mydiv.style.pixelHeight (long) = " + foodiv.style.pixelHeight + "/n";
report.value= report.value + " mydiv.style.pixelWidth (long) = " + foodiv.style.pixelWidth + "/n";
report.value= report.value + " mydiv.style.posTop (long) = " + foodiv.style.posTop + "/n";
report.value= report.value + " mydiv.style.posLeft (long) = " + foodiv.style.posLeft + "/n";
report.value= report.value + " mydiv.style.posHeight (long) = " + foodiv.style.posHeight + "/n";
report.value= report.value + " mydiv.style.posWidth (long) = " + foodiv.style.posWidth + "/n";
}
function two() {
report.value = "Each object has a set of offset positions. The offset properties for the positioned darkBlue DIV above are: /n";
report.value= report.value + " offsetLeft = " + foodiv.offsetLeft + "/n";
report.value= report.value + " offsetTop = " + foodiv.offsetTop + "/n";
report.value= report.value + " offsetHeight = " + foodiv.offsetHeight + "/n";
report.value= report.value + " offsetWidth = " + foodiv.offsetWidth + "/n";
report.value= report.value + " offsetLeft = " + document.body.offsetLeft + "/n";
report.value= report.value + " offsetTop = " + document.body.offsetTop + "/n";
report.value= report.value + " offsetHeight = " + document.body.offsetHeight + "/n";
report.value= report.value + " offsetWidth = " + document.body.offsetWidth + "/n";
}
function three() {
report.value = "Scroll values for the darkBlue DIV object" + "/n";
report.value= report
- clientX, clientY,offsetX, offsetY, screenX, screenY, x,y的区别
- clientX, clientY,offsetX, offsetY,screenX, screenY, x, y
- clientX, clientY,offsetX, offsetY,screenX, screenY, x, y 的区别是什么?
- clientX, clientY,offsetX, offsetY,screenX, screenY, x, y,pageX,pageY的区别
- clientX, clientY,offsetX, offsetY,screenX, screenY, x, y 的区别是什么?
- js鼠标事件中的clientX/clientY,screenX/screenY,pageX/pageY,offsetX/offsetY,layerX/layerY,x/y
- JS之clientX,clientY,screenX,screenY,offsetX,offsetY区别测试
- js定位,jq定位,jquery定位,clientX,clientY,offsetX,offsetY,screenX,screenY
- 理解e.clientX、e.clientY、e.pageX、e.pageY、e.offsetX、e.offsetY、e.screenX、e.screenY
- event对象的clientX,clientY与offsetX,offsetY有何不同?还有x,y?
- clientX/clientY 与 screenX/screenY 的区别
- JS:clientX/Y、screenX/Y、pageX/Y、offsetX/Y、layerX/Y、x/y
- clientX,clientY,pageX,pageY,screenX,screenY的区别
- clientX, pageX, offsetX,x, layerX, screenX, offsetLeft
- clientX,pageX,offsetX,x,layerX,screenX,offsetLeft
- clientX,pageX,offsetX,x,layerX,screenX,offsetLeft
- pageX、clientX、screenX、offsetX、layerX、x
- screenX/clientX/pageX/layerX/offsetX/x
- char和wchar_t的转换
- 使用 Spring 2.5 注释驱动的 IoC 功能
- 中文搜索引擎技术揭密:排序技术【后知后觉。笨鸟】
- Linux 焦点模型分析
- Asp.net2005控件重命名时提示“目录名无效”的解决方法
- clientX, clientY,offsetX, offsetY,screenX, screenY, x, y
- Random类
- 学习GTK+笔记一
- windows mobile 5.0批量删除contact联系人
- 五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)
- php javascript 中文 编码
- 网页窗口关闭前进行提示(适用于IE和FF, 标题栏的X关闭按钮)
- 怎么从邮箱中获取所有联系人列表
- 驱动程序编写及虚拟机调试方式简介