![]() |
Text Scroll |
<!-- Copyright Samar Abbas, 14th August 2000 http://www.oocities.org/samarstan --> <script> var disp_txt = "Hello this is Samar's Pain Text Scroller" var width=50 function scroll() { var space = " " msg = disp_txt for(x=0; x<width; x++ ) { space += " " } if (width< 0) { space = disp_txt.substring( -width, disp_txt.length ) } else space = space + disp_txt document.sform.field.value = space space = " " setTimeout( 'scroll()', 30 ) width-- if (width< -disp_txt.length ) { width = 50 } } </script> <center> <form name="sform"> <!-- <input type="button" value="start" onClick="scroll()"> --> <input type="text" name="field" size="50"> </form> </center> |
|