读秒60秒以后文字变化为重新发送
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<DIV id="CountMsg" class="HotDate">
<span id="t_s"></span>
</DIV>
<script type="text/javascript">
var timer = setInterval(function(){
doItPerSecond();
},1000)
var num = 60;
function doItPerSecond() {
//dosomething...
num--;
if(num>=0)
{
document.getElementById("t_s").innerHTML = num + "秒";
}
else
{
document.getElementById("t_s").innerHTML = "重新发送";
}
/* console.log(num);*/
}
</script>
</body>
</html>