计时器
来源:互联网 发布:快手直播人气软件 编辑:程序博客网 时间:2024/06/10 13:40
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <script> var i = 0; var start; window.onload = function(){ document.getElementById("btn").onclick = function(){ //创建计时器,在指定周期内循环执行 start = setInterval("addTime()",1000); } document.getElementById("clo").onclick = function(){ //清除计时器 clearInterval(start); } } function addTime(){ i++; document.getElementById("show").innerHTML = i; } </script> </head> <body> <div id="show"></div> <button id="btn">开始计时</button> <button id="clo">停止计时</button> </body></html>
阅读全文
0 0
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- 计时器
- ┖no.1 ┒微信小程序之Hello World
- 安装nginx:
- 给文字加描边,文字中加图片
- SHA算法
- [IOS开发]重力感应判断屏幕状态-Swift
- 计时器
- Log4J的详细描述和操作-Java
- 循环队列的应用——舞伴配对问题(数据结构 C语言)
- Java——基于JDK的几种加密方式
- Flex 学习之路之八 用户接口user interface 位置大小的设置
- eureka监听各服务状态,下线、重连等,并做相应的处理
- 2.消息中间件概述
- Python3 压缩与解压缩(zlib / gzip / bz2 / lzma / zipfile / tarfile)
- 网络间进程的通信--socket