if語句不是循環(huán)吧?干嘛用continue
? for(var i=0;i<content.childNodes.length;i++){
? ? ? if(content.childNodes[i].nodeType!=1){ ??
? ? ? ? ?continue; ?
? ? ? }else{
? ? ? ? ?content.removeChild(content.childNodes[i]); ? ?
? ? ? }
? ? ? ? ?
? ? ? }
? for(var i=0;i<content.childNodes.length;i++){
? ? ? if(content.childNodes[i].nodeType!=1){ ??
? ? ? ? ?continue; ?
? ? ? }else{
? ? ? ? ?content.removeChild(content.childNodes[i]); ? ?
? ? ? }
? ? ? ? ?
? ? ? }
2015-09-23
舉報
2015-09-24
continue就是跳出本次循環(huán),接著進(jìn)行下一次循環(huán)。
2015-09-23
提示作用