发新话题
打印

help!!!!

help!!!!

我有段让背景移动的代码。可是它只是横着移。我想让他向下移动要  怎么改  
<script  language="JavaScript">  
var  backgroundOffset=0;  
var  bgObject=eval('document.body');  
function  scrollBG(maxSize){  
backgroundOffset=backgroundOffset+1;  
if(backgroundOffset>maxSize)backgroundOffset=0;  
bgObject.style.backgroundPosition="0"+backgroundOffset;  
}  
var  ScrollTimer=window.setInterval("scrollBG(307)",64);  
</script>

TOP

<script  language="JavaScript">  
var  backgroundOffset=0;  
function  scrollBG(maxSize){  
           backgroundOffset=backgroundOffset+1;  
           if(backgroundOffset>maxSize)backgroundOffset=0;  
           document.body.style.backgroundPositionY="0"+backgroundOffset;  
           }  
var  ScrollTimer=window.setInterval("scrollBG(307)",64);  
</script>

TOP

发新话题