取得网页上控件的绝对位置(坐标)
<script language="javascript"> function getIE(e) { var t=e.offsetTop; var l=e.offsetLeft; var w=e.offsetWidth; var h=e.offsetHeight; while(e=e.offsetParent) { t+=e.offsetTop; l+=e.offsetLeft; } alert("top="+t+"\nleft="+l+"\nWidth="+w+"\nHeight="+h); } </script> <p><p> <input type="button" onclick=getIE(this); value="click me">