试试下面的:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<div id=id1>adfsdf </div><input type="button" name="button" value="click me" onclick=alert(id1.offsetLeft+","+id1.offsetTop)>
</body>
</html>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<div id=id1>adfsdf </div><input type="button" name="button" value="click me" onclick=alert(id1.offsetLeft+","+id1.offsetTop)>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货