Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Objects
Window Object
window.setTimeout
METHOD: Window::setInterval
window.
setInterval
(expression/function, milliseconds)
This method is used to call a function or evaluate an expression at specified intervals, in milliseconds. This will continue until the
clearInterval
method is called or the window is closed. The ID value returned by
setInterval
is used as the parameter for the
clearInterval
method. Note that if an expression is to be evaluated, it must be quoted to prevent it being evaluated immediately
The following example uses the
setInterval
method to call the clock() function which updates the time in a text box.
Code:
<form name="myForm" action="" method="POST">
<input name="myClock" type="Text">
<script language=javascript>
self.setInterval('clock()', 50)
function clock() {
time=new Date()
document.myForm.myClock.value=time
}
</script>
</form>
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information