website promotion banner
eturnkeys
Your Ad Here
Web Programming  Home Web Programming JavaScript Neon Text
rss

Neon Text

Author: Julian Freeman More by this author


 
   
 
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>



Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Neon Text"