2018年度财务预算表:紧急求助!如何在网页中加入随鼠标移动的彩色字符?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/03 00:25:30
请提供源代码,谢谢!急用!!!

<SCRIPT language=javascript>
var message="****************************"
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>

我来回答!
你说的是网页特效!一般的网页制作软件是不能完成他的,你必须去下载辅助软件来完成他,例如你可以去
www.newhua.com 或者www.skycn.com下载网页特效精灵来完成他!你只需把特效精灵中的代码复制到网页代码中就行了。 就这样!```

我以前用过但不知道还有没有