用window.document.body对象时
offsetWidth、offsetHeight    IE工作区宽和高
clientWidth、clientHeight    IE可见区宽和高
scrollWidth、scrollHeight    IE水平滚动板宽度和垂直滚动板高度
screen.width、screen.height  屏幕的分辩率

解决方案 »

  1.   

    元素必须用position: absolute属性,才能取得它的位置。<img id=obj1 border="0" src="xxx.gif" width="45" height="21" STYLE="position: absolute; left: 438; top: 243"><script>
    top=obj1.style.top; 
    left=obj1.style.left;
    alert("元素相对左上角的位置是:("+top+","+left+")");
    </script>
      

  2.   

    alert(this.offsetParent.offsetTop+this.offsetTop)
      

  3.   

    ok啦,这样解决的:
    loEL.style.position = "absolute";
    alert(loEL.offsetLeft);
    alert(loEL.offsetTop);
    loEL.style.position = "";放分.......