如何在倒計時結(jié)束時打開新的網(wǎng)址或者本地HTML網(wǎng)頁?
我將代碼修改成了下面,當?shù)褂嫊r為0 時調(diào)用Wopen()這個函數(shù)打開一個新網(wǎng)址。但每次倒計時結(jié)束后總是無法打開
?curShowTimeSeconds?=?getCurrentShowTimeSeconds() ????if(curShowTimeSeconds?==?0?){ ???????Wopen(); ????}else{ ????????setInterval( ????????function(){ ????????????render(?context?); ????????????update(); ????????} ????????, ????????50 ????);} } function?Wopen()?{ ????window.open('http://idcbgp.cn','_blank') }
2016-06-30
把判斷放到getCurrentShowTimeSeconds()里面即可!