Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
Sexual Content
Violent or Repulsive Content
Hateful or Abusive Content
Harmful Dangerous Acts
Child Abuse
Spam
Infringes My Rights
settimeout() function
setTimeout, a method of the window object, basically delays the execution of a function or statement until the specified time has passed. The basic syntax of this function is:
setTimeout("expression", delaytime)
"expression" is the function/statement you want delayed, and delaytime is the delay time, in milliseconds.
Example : 1
<script language=javascript>
document.df.hi.value=""
//simply clears the text box
function time(){
setTimeout("document.df.hi.value='Three seconds have gone!'",3000)
}
</script>
<form name="df">
<input type="text" name="hi" size="28">
<input type="button" value="Start" onClick="time()">
</form>