首页 | 代码中心 | 源码下载 | 用户管理 | 用户留言 | 导航 | 繁體
代码秀,专业程序代码提供商(源码下载,编程技术)
步骤一: 请将下面的原代码插入到下面 <Script language="JavaScript"> <-- /****** Things you can change *****/ msg="欢迎光临顺新商务娱乐网"; msgSize=4;//1-7 FoNt='Arial'; CoLoR='777777'; speed=2; /****** Things you shouldn't change *****/ ns=(document.layers)?1:0; msg=msg.split(''),amount=msg.length,Y=0,X=0,ypos=0,xpos=0,ybase=new Array(),xbase=new Array(); angle = new Array(),divTop= new Array(),divLeft=new Array(); DocHeight=(document.layers)?window.innerHeight:window.document.body.offsetHeight; DocWidth=(document.layers)?window.innerWidth:window.document.body.offsetWidth; //initial layer placement! for (i=0; i < amount; i++){ divTop[i]=Math.round(Math.random()*DocHeight); divLeft[i]=Math.round(Math.random()*DocWidth); } if (ns){ for (i = 0; i < amount; i++) {document.write(''+msg[i]+'');} window.captureEvents(Event.MOUSEMOVE); function nsMouse(evnt){ ypos = evnt.pageY-20; xpos = evnt.pageX-10; } window.onMouseMove = nsMouse; } else{ document.write('') document.write('') for (i=0; i < amount; i++) {document.write(''+msg[i]+'')} document.write('') function ieMouse(){ ypos = event.y-20; xpos = event.x-10; } document.onmousemove = ieMouse; } function GoToMouse(){ var DocHeight=(document.layers)?window.innerHeight:window.document.body.offsetHeight; var DocWidth=(document.layers)?window.innerWidth:window.document.body.offsetWidth; var iscrll=(document.all)?document.body.scrollTop:0; var nscrll=(document.layers)?window.pageYOffset:0; if (!ns)hldr.style.top=iscrll; for (i=0; i < amount; i++){ Y = ypos - divTop[i]; X = xpos - divLeft[i]; angle[i] = Math.round(Math.atan2(Y,X) * 180/Math.PI); if (angle[i] < 0) angle[i] += 360; ybase[i]=Math.round(Math.random()*DocHeight); xbase[i]=Math.round(Math.random()*DocWidth); rep=Math.round(Math.random() * 3); extra=Math.round(Math.random() * 200) if (rep == 3)xbase[i] =-extra; if (rep == 2)xbase[i] =DocWidth+extra; if (rep == 1)ybase[i] =-extra; if (rep == 0)ybase[i] =DocHeight; y = Math.round(speed*Math.sin(angle[i]*Math.PI/180)); x = Math.round(speed*Math.cos(angle[i]*Math.PI/180)); divTop[i]+=y; divLeft[i]+=x; if ((divLeft[i] > xpos-speed) && (divLeft[i] < xpos+speed/1.5) && (divTop[i] >= ypos-speed/1.5) && (divTop[i] <= ypos+speed/1.5)) {divTop[i]=ybase[i]+nscrll;divLeft[i]=xbase[i]} var layer=(document.layers)?document.layers['nsd'+i]:ied[i].style; layer.top=divTop[i];layer.left=divLeft[i]; } S=setTimeout('GoToMouse()',10); } window.onload=GoToMouse; //--> </Script> 特别说明:如网页特效代码中有引用图片文件等,请自己下载到本地调试!