<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"> 
 

相关文章:

  • 2021-09-19
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-11-18
  • 2022-12-23
猜你喜欢
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-01-01
相关资源
相似解决方案