DHTML 手册.chm
请先去下了这个再来问吧

解决方案 »

  1.   

    <table width="500" border="1" cellspacing="0" cellpadding="0">
      <tr onmouseover="ss(this)">
        <td>&nbsp;</td>
      </tr>
      <tr onmouseover="ss(this)">
        <td>&nbsp;</td>
      </tr>
      <tr onmouseover="ss(this)">
        <td>&nbsp;</td>
      </tr>
      <tr onmouseover="ss(this)">
        <td>&nbsp;</td>
      </tr>
      <tr onmouseover="ss(this)">
        <td>&nbsp;</td>
      </tr>
    </table>
    <script>
    function ss(e){
    var left=e.offsetLeft
    var top=e.offsetTop
    while (e=e.offsetParent) {
    left += e.offsetLeft;
    top += e.offsetTop;
    alert("左边距:"+left+"右边距:"+top )}
    };
    </script>