<div id="divdown1"> </div>
<script language="javascript" type="text/javascript">
var interval = 1000;
var timeCount=15;
window.setInterval(function(){timeCountdown("divdown1");},1000);
function timeCountdown(divname){
var cc = document.getElementById(divname);
if(timeCount>0){
timeCount=timeCount-1;
}
cc.innerHTML ="还有 "+timeCount+" 秒";
return timeCount;
}
</script>
本文链接http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20130508/37583.html
时间: 2025-01-31 06:45:06