setTimeout() with a pointer to a function : Function : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Function »

 

setTimeout() with a pointer to a function




<html>
<head>
<script type="text/javascript">
function timeout(){
    window.setTimeout("show_alert()",2000)
}
function show_alert(){
    alert("hi")
}
</script>
</head>

<body>
<form>
<input type="button" onclick="timeout()" value="Count down">
</form>
</body>

</html>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Function