<div id="marquees">
<a href="#"><img src="images/index_08.jpg" height="210" width="210" border="0"></a><br>
<a href="#"><img src="images/index_08.jpg" height="210" width="210" border="0"></a><br>
<a href="#"><img src="images/index_08.jpg" height="210" width="210" border="0"></a><br>
<a href="#"><img src="images/index_08.jpg" height="210" width="210" border="0"></a><br>
</div>
<script language="JavaScript">
marqueesHeight=678;
stopscroll=false;
with(marquees){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
document.write('<div id="templayer" ></div>');
preTop=0; currentTop=0;
function init(){
templayer.innerHTML="";
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollUp()",50);
}
document.body.onload=init;
function scrollUp(){
if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1;
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
marquees.scrollTop+=1;
}
}
</script>
就是失效,不提示错误,求解