var oInput =..;
var left;
while(oInput)
{
left += oInput.offsetLeft
oInput = oInput.offsetParent;
}
var left;
while(oInput)
{
left += oInput.offsetLeft
oInput = oInput.offsetParent;
}
解决方案 »
- jQuery怎么去除一个节点下所有节点的样式
- div内部的有效链接能触发div上的事件么?
- JSP页面查找问题
- 还是js的时钟被加速的问题!
- 有关字符转义的问题
- 如何在脚本中改变lable 中字体的颜色
- 把企业邮局登陆的窗口放到自己的网页上,怎么解决?
- 对象引用问题,谢谢
- 紧急!帮忙啊!如何获得使用<div class="test" id="mydiv"> ...</div>定义的对象
- EXT嵌套表格列加入事件方法?
- 用Javascprit如何实现在客户端检测该机器上是否安装了Acrobat Reader!!!!!!
- 请问window.showModelessDialog与window.open有什么区别?
<tr>
<td><input id="ipt1"></td>
</tr>
</table><script>
var _rect = ipt1.getBoundingClientRect();
alert("top:" + _rect.top + ",left:" + _rect.left + ",right:" + _rect.right+",bottom:" + _rect.bottom);
</script>