JavaScript - An open source scripting language, it allows the creation of dynamic web page content.  Home Web Programming JavaScript Up and Down Text

Up and Down Text


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>



Author's URL: Markus Dome
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

No comments yet...
Add comments to "Up and Down Text"

Captcha