Scrolling Text in Title Bar

[Total: 0    Average: 0/5]

This script scrolls the text in the title bar of the window.

Head Code:

<script language="javaScript">
var pos=0; 
var nar="This is the message that scrolls. ";
function scroll() 
{ 
  document.title=nar.substring(pos,nar.length)+nar.substring(0,pos);
  pos=(pos+1)%nar.length;
} 
function Thisinit()
{
  setInterval("scroll()",100);
}
</script> 

Body Code:

<a href="javascript:Thisinit()">start scrolling</a>

Times Viewed: 4

Leave a Reply

Your email address will not be published. Required fields are marked *