|
作者: hudou [hudou] 论坛用户 | 登录 |
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title></title> <STYLE>.spanstyle { COLOR: #0066ff; FONT-FAMILY: 隶书; FONT-SIZE: 14pt; FONT-WEIGHT: normal; POSITION: absolute; TOP: -50px; VISIBILITY: visible } </STYLE> </head> <body bgcolor="#fef4d9" onload=JavaScript:pageonload()> <SCRIPT language=javascript> var message="欢 迎 光 临 javascript 精 彩 世 界 !"; 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 language=javascript> 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 language=javascript> function pageonload() { makesnake(); window.setTimeout("pageonload();", 2); } </SCRIPT> <script language="JavaScript"> <!-- Begin text = "欢迎光临网页制作特效站"; //显示的文字 color1 = "blue"; //文字的颜色 color2 = "red"; //转换的颜色 fontsize = "6"; //字体大小 speed = 100; //转换速度 (1000 = 1 秒) i = 0; if (navigator.appName == "Netscape") { document.write("<layer id=a visibility=show></layer><br><br><br>"); } else { document.write("<div id=a></div>"); } function changeCharColor() { if (navigator.appName == "Netscape") { document.a.document.write("<center><font face=arial size =" + fontsize + "><font color=" + color1 + ">"); for (var j = 0; j < text.length; j++) { if(j == i) { document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>"); } else { document.a.document.write(text.charAt(j)); } } document.a.document.write('</font></font></center>'); document.a.document.close(); } if (navigator.appName == "Microsoft Internet Explorer") { str = "<center><font face=arial size=" + fontsize + "><font color=" + color1 + ">"; for (var j = 0; j < text.length; j++) { if( j == i) { str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>"; } else { str += text.charAt(j); } } str += "</font></font></center>"; a.innerHTML = str; } (i == text.length) ? i=0 : i++; } setInterval("changeCharColor()", speed); // End --> </script> </body> </html> |
地主 发表时间: 04-02-01 22:23 |
回复: hudou [hudou] 论坛用户 | 登录 |
脚本说明: 把如下代码加入<body>区域中: <script language="JavaScript"> <!-- Begin text = "欢迎光临网页制作特效站"; //显示的文字 color1 = "blue"; //文字的颜色 color2 = "red"; //转换的颜色 fontsize = "6"; //字体大小 speed = 100; //转换速度 (1000 = 1 秒) i = 0; if (navigator.appName == "Netscape") { document.write("<layer id=a visibility=show></layer><br><br><br>"); } else { document.write("<div id=a></div>"); } function changeCharColor() { if (navigator.appName == "Netscape") { document.a.document.write("<center><font face=arial size =" + fontsize + "><font color=" + color1 + ">"); for (var j = 0; j < text.length; j++) { if(j == i) { document.a.document.write("<font face=arial color=" + color2 + ">" + Text.charAt(i) + "</font>"); } else { document.a.document.write(text.charAt(j)); } } document.a.document.write('</font></font></center>'); document.a.document.close(); } if (navigator.appName == "Microsoft Internet Explorer") { str = "<center><font face=arial size=" + fontsize + "><font color=" + color1 + ">"; for (var j = 0; j < text.length; j++) { if( j == i) { str += "<font face=arial color=" + color2 + ">" + text.charAt(i) + "</font>"; } else { str += text.charAt(j); } } str += "</font></font></center>"; a.innerHTML = str; } (i == text.length) ? i=0 : i++; } setInterval("changeCharColor()", speed); // End --> </script> |
B1层 发表时间: 04-02-01 22:24 |
回复: hudou [hudou] 论坛用户 | 登录 |
这是第二个 脚本说明: 第一步:把如下代码加入<head>区域中 <STYLE>.spanstyle { COLOR: #0066ff; FONT-FAMILY: 隶书; FONT-SIZE: 14pt; FONT-WEIGHT: normal; POSITION: absolute; TOP: -50px; VISIBILITY: visible } </STYLE> 第二步:把如下代码加入<body>区域中 <SCRIPT language=javascript> var message="欢 迎 光 临 javascript 精 彩 世 界 !"; 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 language=javascript> 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 language=javascript> function pageonload() { makesnake(); window.setTimeout("pageonload();", 2); } </SCRIPT> 第三步:把<body>改为 <body bgcolor="#fef4d9" onload=javascript:pageonload()> |
B2层 发表时间: 04-02-01 22:26 |
回复: hudou [hudou] 论坛用户 | 登录 |
我现问题就出现在这<body bgcolor="#fef4d9" onload=JavaScript:pageonload()> |
B3层 发表时间: 04-02-01 22:28 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号