|
Welcome to Javascript
setTimeout and window.status:
<script>
function TimeUntilWawasan2020() {
various commands to calculate how many seconds until the year 2020;
}
function SetStatus(x) {
window.status = "Only " + x + " seconds until the year 2020!!!" ; // This sets the status
x = x - 1;
command = "SetStatus(" + x + ");" ; // This prepares to set the status again with a
setTimeout(command,1000) ; // new value of x in one second's time.
}
x = TimeUntilWawasan2020(); // Find out how long until the year 2020
SetStatus(x); // Set the status bar to show that number.
</script>
Thanks for coming!
|