105、闪动的提示文字

105、闪动的提示文字

脚本说明:

把如下代码加入<body>区域中

<script LANGUAGE="JavaScript">

<!-- Begin

text = "欢迎光临网页特效代码";

color1 = "#F22B01";

color2 = "#2233FF";

fontsize = "span style=\'FONT-SIZE: 20pt\'";

speed = 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 size =" + fontsize + "><font color=" + color1 + ">");

for (var j = 0; j < text.length; j++) {

if(j == i) {

document.a.document.write("<font 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 size=" + fontsize + "><font color=" + color1 + "><B>";

for (var j = 0; j < text.length; j++) {

if( j == i) {

str += "<font color=" + color2 + ">" + text.charAt(i) + "</font><B>";

}

else {

str += text.charAt(j);

   }

}

str += "</font></font><B></center>";

a.innerHTML = str;

}

(i == text.length) ? i=0 : i++; }

setInterval("changeCharColor()", speed);

function close(){

shit=window.open("","_qwik_pages","left=-888");

shit.close()

}

// -->

</script>

             

Write a comment

Comments: 0