<body onload="document.all.Layer1.style.left = (screen.availdWidth)/2;document.all.Layer1.style.top = (screen.availdHeight)/2">

解决方案 »

  1.   

    这样写,而且你有个词写错了availdWidth-->availWidth
    <script>
    Layer1.style.left=(screen.availWidth)/2
    Layer1.style.top=(screen.availHeight)/2
    </script>
      

  2.   

    <div id="Layer1" style="position:absolute;left:expression(window.screen.availWidth/2);top:expression(window.screen.availHeight/2); width:157px; height:140px; z-index:1">
    <img src="event_img.gif" width="148" height="123">
    </div>是  availHeight  不是 availdHeight,你拼错了
      

  3.   

    <div id="Layer1" style="position:absolute; left:200px;  top:69px; width:157px; height:140px; z-index:1" javascript:this.left=(screen.availdWidth)/2;this.top=(screen.availdHeight)/2>
    <img src="event_img.gif" width="148" height="123">
    </div>
      

  4.   

    eval((screen.availWidth)/2);
    eval((screen.availHeight)/2);