<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<!--
作者:offline
时间:2017-04-04
描述:15秒的倒计时
-->
<span class="span1">00</span>:
<span class="span2">15</span>:
<span class="span3">00</span>
<br>
<!--
作者:offline
时间:2017-04-04
描述:15分钟的倒计时
-->
<span class=" span4">15</span>:
<span class="span5">00</span>:
<span class="span6">00</span>
</body>
<script src="js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
var i=14;
var m=99;
setInterval(function(){
if(i>=0){
m=99;
$('.span2').text(i--);
}
},1000)
setInterval(function(){
if(m>=0){
$('.span3').text(m--);
}
},10)
})
$(function(){
var i=14,m=59,n=99;
setInterval(function(){
if(i>=0){
m=59;
$('.span4').text(i--);
}
},6000)
setInterval(function(){
if(m>=0){
n=99;
$('.span5').text(m--);
}
},1000)
setInterval(function(){
if(n>=0){
$('.span6').text(n--);
}
},10)
})
</script>
</html>