<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>
js SetTimeOut示例
最新推荐文章于 2022-08-23 09:45:24 发布