setTimeout()

来源:互联网 发布:windows系统log 编辑:程序博客网 时间:2024/05/18 22:42
<html><body><p>A window will be appeared after five seconds once you click this button.</p><button onclick="myFunc()">button</button><script type="text/javascript">function myFunc(){setTimeout("alert('after five seconds')",5000);}</script></body></html>


The function setTimeout() is used to call functions or execute expressions after a specified number of milliseconds.And the code in the function will execute only once.

0 0
原创粉丝点击