Her

Home Web Programming JavaScript Up and Down Text

Up and Down Text

Author: Markus Dome Author's URL: www.webdesignhelper.co.uk More by this author

Up and Down Text
Click to view

Put this code into your page:

<html>
<head>

<style>
.text
{
FONT: 10pt arial;
COLOR: black
}
</style>

<script>

var fs=1
var direction="right"

function updowntext(whichone)
{
var thetext=whichone
for (i=0;i<thetext.length;i++)
{
document.write(thetext.charAt(i).fontsize(fs))

if (fs<7&&direction=="right")
fs++
else if (fs==7){
direction="left"
fs--
}
else if (fs==1){
direction="right"
fs++
}
else if (fs>1&&direction=="left")
fs--
}
}

</script>
</HEAD>

<BODY BGCOLOR="#FFFFFF">

<br><br><br>
<center>
<TABLE width="320" 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=300 height=30 bgcolor=white align=center>
<span class=text><script>
updowntext("Sample Code Six, Up And Down Text From WebDesignHelper.co.uk")
</script></span></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>
</html>