44、荧光灯效果的文字

44、荧光灯效果的文字

<html>

<head>

<title>网页特效---荧光灯效果的文字</title>

</head><body bgcolor="#000000">

<!--将以下代码加入HTML<Body></Body>之间-->

 

<script language="JavaScript1.2">

 

var message="网页特效___网页特效"

var neonbasecolor="0000FF"

var neontextcolor="FF0000"

var flashspeed=100

 

var n=0

if (document.all){

document.write('<font color="'+neonbasecolor+'">')

for (m=0;m<message.length;m++)

document.write('<span id="neonlight">'+message.charAt(m)+'</span>')

document.write('</font>')

 

var tempref=document.all.neonlight

}

else

document.write(message)

 

function neon(){

 

//Change all letters to base color

if (n==0){

for (m=0;m<message.length;m++)

tempref[m].style.color=neonbasecolor

}

 

//cycle through and change individual letters to neon color

tempref[n].style.color=neontextcolor

 

if (n<tempref.length-1)

n++

else{

n=0

clearInterval(flashing)

setTimeout("beginneon()",1500)

return

}

}

 

function beginneon(){

if (document.all)

flashing=setInterval("neon()",flashspeed)

}

beginneon()

 

 

</script>

</body></html>

 

Write a comment

Comments: 0