|
Note that the script goes in the HEAD of the document.
<Html>
<Head>
<title>Scrolling Text</title>
<script language=javascript>
barMsg="Welcome to Web Builder 101..."
i=0
function scrollMsg() {
beginningPart=barMsg.substring(i,barMsg.length)
endPart=barMsg.substring(0,i)
window.status=beginningPart+endPart
if (i < barMsg.length) {
i++ }
else {
i=0 }
setTimeout("scrollMsg()",50)
}
</script>
<Body bgcolor=white onLoad="scrollMsg()">
It works!!!
</body>
</html>
Click here
to see it in action.
|