Neon Text


 
   
 
Click to start the script.

Put this code into your page:

<html>
<head>

<style>
.neontext
{
FONT: 10pt arial;
COLOR: black;
background-color: white;
border: medium none
}
</style>

<script>
var message="WebDesignHelper.co.uk"
var neonbasecolor="black"
var neontextcolor="red"
var flashspeed=100
var n=0
</script>
</HEAD>

<BODY onload="beginneon();" BGCOLOR="#FFFFFF">

<br><br>
<center>
<TABLE width="220" border="0" cellpadding="0" cellspacing="0" bgcolor=#F5F4E0>
<tr>
<td colspan=3><img src=images/spacer.gif height=10></td>
</tr>
<tr>
<td><img src=images/spacer.gif width=10></td>
<td width=200 height=30 bgcolor=white align=center><script>
if (document.all)
{
for (m=0;m<message.length;m++)
document.write('<span class=neontext id="neonlight">'+message.charAt(m)+'</span>')
var tempref=document.all.neonlight
}
else
document.write(message)
</script></td>
<td><img src=images/spacer.gif width=10></td>
</tr>
<tr>
<td colspan=3><img src=images/spacer.gif height=10></td>
</tr>
</table>
</center>

</body>

<script language="JavaScript1.2">

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()",500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}

</script>
</html>



Author's URL: Julian Freeman
JavaScript - An open source scripting language, it allows the creation of dynamic web page content. More JavaScript Tutorials: Featured Materials | Fresh Materials | More JavaScript Tutorials at LearnPHP.org

Reader's comments
comments sim July 01, 2011 says:
bt i'ts not working
Reply
Add comments to "Neon Text"

Captcha