一个原生js基于面向对象的计时器(小案例),有开始,暂停,继续等功能
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>倒计时</title>
</head>
<style>
*{
margin:0;
padding: 0;
}
</style>
<body>
<div style="padding:20px">
<input type="text" value="10" id="number" style="height: 36px; line-height: 36px;"/>
</div>
<div style="padding:0 20px">
<button id="start">开始</button>
<button id="stop">暂停</button>
<!-- <button id=&#