Display a scrolling text message on a form button. Completely customizable.
<!– ONE STEP TO INSTALL SCROLLING TEXT BUTTON:
1. Copy the coding into the BODY of your HTML document –>
<!– STEP ONE: Paste this code into the BODY of your HTML document –>
<BODY>
<script type=”text/javascript”>
<!–
var author=”jdstiles.com”;
var DS_ScrollText=”JavaScript Tutorials”;
var DS_Speed=(5-(1))*35; // Change the last number to change the speed of the scroll
document.write(“<form name=”ds_form”><input type=”button” name=”ds_scrollb” value=”” onClick=”javascript:window.location.href=’http://javascriptsource.com/tutorials/'” style=”background-color:#000098;font-size:12;color:#ffffff;font-family:monospace”>”);
var DS_ScrollCounter=0;
var DS_I=0;
while(DS_I++<4)
DS_ScrollText=” “+DS_ScrollText;
function DS_ButtonScroll(){
document.ds_form.ds_scrollb.value=DS_ScrollText.substring(DS_ScrollCounter,DS_ScrollText.length)+DS_ScrollText.substring(0,DS_ScrollCounter);;
DS_ScrollCounter++;
DS_ScrollCounter%=(DS_ScrollText.length);
setTimeout(“DS_ButtonScroll()”,DS_Speed);
}
DS_ButtonScroll();
// –>
</script>
<p><center>
<font face=”arial, helvetica” size”-2″>Free JavaScripts provided<br>
by <a href=”https://javascriptsource.com”>The JavaScript Source</a></font>
</center><p>