<!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.0">
<title>Document</title>
</head>
<body>
<button id="but">点击</button>
<script>
/*
定时器分为两种:
一次性定时器
语法: steTimeout(function (){},时间 )
反复性定时器
语法: steInterval(function (){},时间)
关闭定时器:
clearTimeout(定时器名称)
clearInterval(定时器名称)
注意: 最好去使用
js定时器
最新推荐文章于 2022-02-28 11:42:55 发布