首页 > 其他 > 详细

一个时间

时间:2017-04-24 09:41:45      阅读:216      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title></title>
</head>

<body>
<input type="button" value="开始计时" onclick="timeout"> 分钟
<form name="a">
<input type="text" value="0" name="minture"></form>

<form name="b">
<input type="text" value="0" name="second"></form>
<input type="button" value="停止计时" onclick="stoptime">

</body>

</html>
<script>
var x = -1;
y = -1;

function countMin() {
y=y+1;
var n=y%60;
document.a.minture.value = n;
setTimeout("countMin()", 1000 * 60)
}

 

function countsec() {
x = x + 1;
var z = x % 60
document.b.second.value = z;
setTimeout("countsec()", 1000)
}

countMin()
countsec()
</script>

一个时间

原文:http://www.cnblogs.com/xieyunhuaxiang/p/6755078.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!