<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>计时器</title>
<script type="text/javascript">
var sec = 0;
//设置计时器
var timeId = setInterval("count();",1000);
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>计时器</title>
<script type="text/javascript">
var sec = 0;
//设置计时器
var timeId = setInterval("count();",1000);
这是一个使用JavaScript实现的简单计时器,通过`setInterval`启动计时并在页面上显示秒数,同时提供了一个按钮,点击后使用`clearInterval`停止计时。
订阅专栏 解锁全文
1826

被折叠的 条评论
为什么被折叠?



