不知道那里问题,就是不出效果
<script type="text/javascript">
function second_count(){
var num=document.getElementById("id").innerHtml;
num=num-1;
if(num>=0){
setTimeout("second_count()",1000);
document.getElementById("id").innerHtml=num;
}else {
window.open("http://www.imooc.com")
}
}
second_count();
function backFn(){
window.history.back();
}
</script>