《效果之8(鼠标带着文字跑)》由会员分享,可在线阅读,更多相关《效果之8(鼠标带着文字跑)(2页珍藏版)》请在金锄头文库上搜索。
1、将脚本加在前:var message=你 好 ! 谢 谢 使 用 。;var messagecolor=FF8000var dismissafter=0var amount=5,ypos=0,xpos=0,Ay=0,Ax=0,By=0,Bx=0,Cy=0,Cx=0,Dy=0,Dx=0,Ey=0,Ex=0;if (document.layers)for (i = 0; i amount; i+)document.write(+message+)window.captureEvents(Event.MOUSEMOVE);function nsmouse(evnt)xpos = evnt.pageX
2、;ypos = evnt.pageY;makefollow()else if (document.all)document.write();document.write();for (i = 0; i amount; i+)document.write(+message+)document.write();document.write();function iemouse()ypos = document.body.scrollTop + event.y;xpos = document.body.scrollLeft + event.x;makefollow()function makefol
3、low()if (document.layers)document.layersns0.top=ay;document.layersns0.left=ax;document.layersns1.top=by;document.layersns1.left=bx;document.layersns2.top=cy;document.layersns2.left=cx;document.layersns3.top=Dy;document.layersns3.left=Dx;document.layersns4.top=Ey;document.layersns4.left=Ex;else if (d
4、ocument.all)outer.all.inner.all0.style.pixelTop=ay;outer.all.inner.all0.style.pixelLeft=ax;outer.all.inner.all1.style.pixelTop=by;outer.all.inner.all1.style.pixelLeft=bx;outer.all.inner.all2.style.pixelTop=cy;outer.all.inner.all2.style.pixelLeft=cx;outer.all.inner.all3.style.pixelTop=Dy;outer.all.in
5、ner.all3.style.pixelLeft=Dx;outer.all.inner.all4.style.pixelTop=Ey;outer.all.inner.all4.style.pixelLeft=Ex;function move()if (dismissafter!=0)setTimeout(hidetrail(),dismissafter*1000)if (document.layers)window.onMouseMove = nsmouseelse if (document.all)window.document.onmousemove = iemouseey = Math.
6、round(Ey+=(ypos+20)-Ey)*2/2);ex = Math.round(Ex+=(xpos+20)-Ex)*2/2);dy = Math.round(Dy+=(ey - Dy)*2/4);dx = Math.round(Dx+=(ex - Dx)*2/4);cy = Math.round(Cy+=(dy - Cy)*2/6);cx = Math.round(Cx+=(dx - Cx)*2/6);by = Math.round(By+=(cy - By)*2/8);bx = Math.round(Bx+=(cx - Bx)*2/8);ay = Math.round(Ay+= (by - Ay)*2/10);ax = Math.round(Ax+= (bx - Ax)*2/10);makefollow();jumpstart=setTimeout(move(),10);function hidetrail()if (document.all)for (i2=0;i2amount;i2+)outer.all.inner.alli2.style.visibility=hiddenclearTimeout(jumpstart)else if (document.layers)for (i2=0;i2