<script type="text/javascript">
function SetTime() {
document.getElementById("Time").innerHTML = parseInt(document.getElementById("Time").innerHTML) -1;
setInterval("CheckTime();", 1000);
}
function CheckTime() {
var ddd = document.getElementById("Time");
if (parseInt(ddd.innerHTML) !="1") {
ddd.innerHTML = parseInt(ddd.innerHTML) -1;
}
else {
alert('时间已到');
//你的操作
}
}
</script>
<div>
<div id="Time" style="border:1px solid red;">60</div>
</div>