|
Welcome to Javascript
Scrolling Status Bar:
<script>
function Scroll(s) { // s is the string to scroll
window.status = s ; // first thing, change the status bar to s
head = s.slice(0,1); // this will "slice" off the first character of s
tail = s.slice(1,s.length); // this will slice off the rest of the characters of s
s = tail + head; // this takes the head, and puts it at the end of the tail
command = "Scroll( '" + s + "' );" ; // this sets up the command ready for setTimeout
setTimeout(command,50) ; // This prepares to run "Scroll" again in 0.05 seconds.
}
message1 = "Welcome to the Web Page Design Workshop at SIT. ";
message2 = "I hope you are all learning a lot! ";
message3 = "Soon you will all have really snazzy web pages!!!! ";
message = message1 + message2 + message3 ;
Scroll(message);
</script>
Thanks for coming!
|