<script language="javascript"> <!-- //by hve var layerW=340; //设定显示区域的宽 var layerH=parseInt(slayer.style.height); var layerL=parseInt(slayer.style.left); var layerT=parseInt(slayer.style.top); var step=0; //scroll value function movstar(a,time){ if (a<0&&step>-parseInt(slayer.scrollWidth)+layerW a>0&&step<0) mov(a); movx=setTimeout("movstar("+a+","+time+")",time); } function movover(){ clearTimeout(movx); } function mov(a){ slayer.style.left = (step+=a) + layerL; clipL=0-step; clipR=layerW-step; clipB=layerH; clipT=0; slayer.style.clip="rect("+clipT+" "+clipR+" "+clipB+" "+clipL+")"; } //--> </script>
<script language="javascript"> <!-- //by hve var layerW=340; //设定显示区域的宽 var layerH=parseInt(slayer.style.height); var layerL=parseInt(slayer.style.left); var layerT=parseInt(slayer.style.top); var step=0; //scroll value function movstar(a,time){ if (a<0&&step>-parseInt(slayer.scrollWidth)+layerW a>0&&step<0) mov(a); movx=setTimeout("movstar("+a+","+time+")",time); } function movover(){ clearTimeout(movx); } function mov(a){ slayer.style.left = (step+=a) + layerL; clipL=0-step; clipR=layerW-step; clipB=layerH; clipT=0; slayer.style.clip="rect("+clipT+" "+clipR+" "+clipB+" "+clipL+")"; } //--> </script>