代码如下,不知道错在哪里...
var num=document.getElementById("cal").innerHTML;
function count(){
num--;
document.getElementById("cal").innerHTML=num;}
if(num>1)
{
setInterval("count()",1000);
}
else
{
window.open("http://www.imooc.com","_self");
}
var num=document.getElementById("cal").innerHTML;
function count(){
document.getElementById("cal").innerHTML=num;} num--;
if(num>1)
{
setInterval("count()",1000);
}
else
{
window.open("http://www.imooc.com","_self");
}