|登录 |注册

查看: 1671|回复: 2
打印 上一主题 下一主题

滑鼠旁边彩色字

 关闭 [复制链接]
yurco
2008-11-7 08:57 PM
  1. <STYLE>.spanstyle{COLOR: #0066ff; FONT-FAMILY: 宋体;FONT-SIZE:9pt;FONT-WEIGHT:normal;POSITION:absolute;TOP:-50px;VISIBILITY:visible}</STYLE><SCRIPT>var message="欢迎来到诛仙Online讨论区";var x,y;var step=12;var flag=0;message=message.split("");var xpos=new Array();for (i=0;i<=message.length-1;i++){xpos[i]=-50;};var ypos=new Array();for (i=0;i<=message.length-1;i++){ypos[i]=-50;};function handlerMM(e){x=(document.layers)?e.pageX:document.body.scrollLeft+event.clientX+10;y= (document.layers)?e.pageY:document.body.scrollTop+event.clientY;flag=1;};function makesnake(){if(flag==1&&document.all){for(i=message.length-1;i>=1;i--){xpos[i]=xpos[i-1]+step;ypos[i]=ypos[i-1];};xpos[0]=x+step;ypos[0]=y;for (i=0; i<=message.length-1; i++){var thisspan=eval("span"+(i)+".style");thisspan.posLeft=xpos[i];thisspan.posTop=ypos[i];thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;}};else if(flag==1 && document.layers){for (i=message.length-1; i>=1; i--){xpos[i]=xpos[i-1]+step;ypos[i]=ypos[i-1];};xpos[0]=x+step;ypos[0]=y;for(i=0; i<message.length-1; i++){var thisspan=eval("document.span"+i);thisspan.left=xpos[i];thisspan.top=ypos[i];thisspan.color=Math.random() * 255 * 255 * 255 + Math.random() * 255 * 255 + Math.random() * 255;}}}</SCRIPT><SCRIPT>for(i=0;i<=message.length-1;i++){document.write("<span id='span"+i+"' class='spanstyle'>");document.write(message[i]);document.write("</span>");};if(document.layers){document.captureEvents(Event.MOUSEMOVE);};document.onmousemove = handlerMM;</SCRIPT><SCRIPT>function pageonload(){makesnake();window.setTimeout("pageonload();", 2);}</SCRIPT><SCRIPT>pageonload()</SCRIPT>
复制代码


我放了这个代码进我帮忙管理论坛,结果滑鼠旁边有"欢迎来到诛仙Online讨论区"
可是我一滚动到下面面他就走完位了

PS:我是从jbtalks 游戏讨论区那里学回来的
还有一样是,这个代码我是放在板块规则那里
fyhao
2008-11-8 08:25 PM
真是厉害,顶一个支持。
孤高之红水晶
2008-11-10 11:21 PM
这个代码我是放在板块规则那里

哪里来的?我也要玩,你把这个代码放在那里?
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2025-10-11 09:37 AM , Processed in 0.097780 second(s), 25 queries .

Powered by Discuz! X2.5 © 2001-2012 Comsenz Inc.

本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved

Dedicated Server powered by iCore Technology Sdn. Bhd.

合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部