數(shù)字不跳轉(zhuǎn),怎么回事啊
var timer=document.getElementById("second").innerHTML; function count(){ document.getElementById("second")=timer; timer--; if(timer==0){ ? window.location.assign("http://baidu.com");} ? } setInterval("count()",1000); function goback(){ ? ? ? window.history.back(); ? }數(shù)字不跳轉(zhuǎn),怎么回事呀
2016-09-20
中間應該是document.getElementById("second").innerHTML=time,我們需要改變的是second中的內(nèi)容
2016-09-12
上面的邏輯關系重復了,應該這樣寫:
var timer=5;
document.getElementById("second").innerHTML=timer;
后面的沒什么問題,你可以試試!