September 22nd, 2005, 06:26 PM
|
#3 (permalink)
|
| Senior Member
Join Date: Nov 2001 Location: Central KS
Posts: 830
|
To add timers capabilyties to an html page, you can use the
window.setInterval method.
Interval=window.setInterval(FctToCall, TimeWait)
with:
FctToCall : string containing the name of the function to call
TimeWait : Time to wait (in milliseconds) before calling FctToCall Code: <Html>
<head>
<Script language="Jscript">
var Interval;
function delay() {
Interval=window.setInterval("document.write('another message')", 2000);
// function will be called every 2 seconds
// Note that you can add any parameters to the function call.
}
</script>
</head>
<body onload="delay()">
</body>
</html> |
| |