範例
將以下程式拷貝回您的網頁
<script language="JavaScript">
<!-- Hide this script from old browsers --
/*
This script came from the 24 hour JavaScripts Site
located at http://www.javascripts.com. It is brought to
you by Eric Jarvies, Lewis Sellers, Giuseppe Lombardo,
Kurt Anderson, and David Medinets.
*/
var id,pause=0,position=0;
function imascroller() {
// variables declaration
var i,k,msg=" 歡迎來到非常網路空間";
// increase msg
k=(150/msg.length)+1;
for(i=0;i<=k;i++) msg+=" "+msg;
// show it to the window
document.form2.imascroller.value=msg.substring(position,position+250);
// set new position
if(position++==250) position=0;
// repeat at entered speed
id=setTimeout("imascroller()",100); }
// -- End Hiding Here -->
</script>
</head>
<body onload="imascroller()" bgcolor="#000000">
<form name="form2"><input type="text" name="imascroller" size="40" value="">
</form>