Webmaster

Tips
All Tips ]

Text in the form of a wave

By adjusting text sizes, you can easily create titles that... surf!

Insert the following script in the <Head> tag of your page:

<SCRIPT LANGUAGE="JavaScript">
<!--
function vague(source)
{
var h = 7
var temp = ""
var direction = 1

for (var i = 0;i <= source.length; i++)
  {
  temp+="<FONTSIZE="+h+">"+source.charAt(i)+"</FONT>"
  if (h == 7)
    direction = -1
  else
    if (h == 1)
      direction = 1
  h += direction
  }
return temp
}
//-->
</SCRIPT>

In the <Body> tag, place this part of the code in the location where you want to insert your text. Simply replace the string your text here with the text you want to display in a wave:

<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(vague("your text here"))
//-->
</SCRIPT>

You obtain the following:

Discover all Webmaster tips.