/*showpage1words*/showWord(w1,document.getElementById('w1'),0,function(){alert(111);});/*showfunction*/functionshowWord(word,objID,i,callback){varwlen=word.length;objID.innerHTML+=word[i];i++;if(isetTimeout(function(){ showWord(word,objID,i);},500);}elseif(i==wlen){callback();}}为什么在callback();这里时,会报错呢?错误是:UncaughtTypeError:undefinedisnotafunctionindex.html:73showWordindex.html:70(anonymousfunction)对callback的用法错了么?应该怎样才是对的?
撒科打诨
胡说叔叔
相关分类