我初学的,不明白你的意思。
var windowwidth = document.bidy.clientWidth-document.getElementById('Layer1').style.width; -----  bidy???????

解决方案 »

  1.   

    错了 是BODY
    可是这么一改整个页面到不了头了
      

  2.   

    document.getElementById('Layer1').style.height; 
    document.getElementById('Layer1').style.width;
    读不到的
    可以用:
    document.getElementById('Layer1').offsetHeight
    document.getElementById('Layer1').offsetWidth;<script> 
    function move(){
    var height = document.body.clientHeight-document.getElementById('Layer1').offsetHeight; 
    var windowwidth = document.body.clientWidth-document.getElementById('Layer1').offsetWidth; 
    document.getElementById('Layer1').style.pixelTop=document.body.scrollTop+height; 
    document.getElementById('Layer1').style.pixelLeft=document.body.scrollLeft+windowwidth; 
    } window.onscroll=move; 
    </script> 
    <style type="text/css"> 
    <!-- 
    #Layer1 { 
    position:absolute; 
    width:140px; 
    height:93px; 
    z-index:1; 
    right:0px; 
    bottom:0px; 
    background: url(1111.jpg) #f00; 

    --> 
    </style> 
    </head> <body> 
    <img src="011.jpg" height=9999> 
    <img src="011.jpg"> 
    <div id="Layer1"> </div> 
    </body> 
      

  3.   

    或用:
    document.getElementById('Layer1').currentStyle.height
    document.getElementById('Layer1').currentStyle.width)<script> 
    function move(){
    var height = document.body.clientHeight-parseInt(document.getElementById('Layer1').style.height||document.getElementById('Layer1').currentStyle.height); 
    var windowwidth = document.body.clientWidth-parseInt(document.getElementById('Layer1').style.width||document.getElementById('Layer1').currentStyle.width); 
    document.getElementById('Layer1').style.pixelTop=document.body.scrollTop+height; 
    document.getElementById('Layer1').style.pixelLeft=document.body.scrollLeft+windowwidth; 
    } window.onscroll=move; 
    </script> 
    <style type="text/css"> 
    <!-- 
    #Layer1 { 
    position:absolute; 
    width:140px; 
    height:93px; 
    z-index:1; 
    right:0px; 
    bottom:0px; 
    background: url(1111.jpg) #f00; 

    --> 
    </style> 
    </head> <body> 
    <img src="011.jpg"height=9999> 
    <img src="011.jpg"> 
    <div id="Layer1" style=""> </div> 
    </body>