js SetTimeOut示例

来源:互联网 发布:淘宝流量钱包不能用了 编辑:程序博客网 时间:2024/06/03 13:11
<html> <head> <script type="text/javascript">   function timedMsg(){      var t=setTimeout("alert('5 seconds!')",5000)   } </script> </head> <body>  <form>   <input type="button" value="Display timed alertbox!" onClick="timedMsg()">  </form>  <p>Click on the button above. An alert box will be displayed after 5 seconds.</p> </body></html>
0 0