大家有兴趣放在自己的主页上,很酷的!把一下代码存入scrollmove.js中,然后再你要用的主页里加入 <SCRIPT language=JavaScript src="scrollmove.js"> </SCRIPT> 下面时代码: ———————————————————————————— var mousex=0 var star=0 width=window.document.body.offsetWidth var left=width*0.1 var right=width-(width*0.1) var b=3 function mousemov() { mousex=event.clientX if(star==0){ if(mousex>0 && mousex<left){mov1=setInterval("mov('-2')",2);star=1} if(mousex>right) {mov1=setInterval("mov('2')",2);star=1} } if(star!==0){ if(mousex>left && mousex<right){clearInterval(mov1);star=0;b=3} } } function mov(a){ b=b+0.2 scrollx=document.body.scrollLeft scrolly=document.body.scrollTop scrollx=scrollx+(a*b) window.scroll(scrollx,scrolly) } —————————————————————————————————— |