<html> <head> <script type="text/javascript"> function timeout(){ setTimeout("alert('Hi')", 1000) } </script> </head> <body> <form> <input type="button" onclick="timeout()" value="Count down"> </form> </body> </html>