mingerlcm

 

 

setInterval("执行的代码",间隔时间)
毫秒单位


每5秒一次会提示出弹框
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Title</title>
</head>
<body>


    <script>
    // 创建一个定时器
    // 第一个参数 执行什么 第二个参数间隔多少
    // 5000毫秒单位 每5秒 执行里面的东西

    // 每5秒一次会提示出弹框
    setInterval("alert(123);",5000)
    </script>
</body>
</html>

 

分类:

技术点:

相关文章:

  • 2022-02-01
  • 2022-02-07
  • 2022-01-20
  • 2021-11-15
  • 2022-12-23
猜你喜欢
  • 2021-12-24
  • 2022-02-13
  • 2022-12-23
  • 2021-09-02
  • 2021-06-28
  • 2021-10-27
相关资源
相似解决方案