How to make a scrolling banner


This tutorial will show you how to insert a scrolling banner on your webpage. A good thing to use this for, is advertising, because people with usually read a message that is scrolling across the page.

You can copy the following script and place it between your <head>...</head> tags in your HTML document :

<SCRIPT LANGUAGE="JavaScript">
var ScrollString="Hi. This text can be changed to whatever you want. it will scroll from right to left. ";
var timer = 0;
function Scrollon() {
document.box.boxtext.value = ScrollString;
ScrollString=ScrollString.substring(1,ScrollString.length)
+ ScrollString.charAt(0);
timer = setTimeout("Scrollon()",75) ;
}
</SCRIPT>

Now you should copy and paste the following script between your <body>...</body> tags:

<BODY onLoad = Scrollon()>
<FORM NAME = "box" onSubmit = "0">
<CENTER>
<INPUT TYPE="text" NAME="boxtext" SIZE="45" VALUE="">
</CENTER>
</BODY>

Notice that the command onLoad= Scrollon() should be inserted in the <body> tag. You can insert your own message in the scrolling banner by just modifying the text in green. The speed of the scrolling can be changed by either increasing(to reduce speed) or decreasing(to increase speed) the value in blue. The box size of the banner can be changed by changing the value in black.



Home | Islam | Jokes | FunZone | Games | Tips | Links | About Me

 






Hosted by www.Geocities.ws

1