if 語句 的執(zhí)行問題
if(content.childNodes[i].nodeType=1){
content.removeChild(content.childNodes[i]);?
}
和
if(content.childNodes[i].nodeType!=1)
{continue;}
else{
content.removeChild(content.childNodes[i]);?
}
有啥區(qū)別呢 結(jié)果運(yùn)行不一樣
if(content.childNodes[i].nodeType=1){
content.removeChild(content.childNodes[i]);?
}
和
if(content.childNodes[i].nodeType!=1)
{continue;}
else{
content.removeChild(content.childNodes[i]);?
}
有啥區(qū)別呢 結(jié)果運(yùn)行不一樣
2016-10-17
舉報(bào)
2016-10-18
判斷的時(shí)候if里面等號(hào)應(yīng)該是==或是===
=是賦值吧 !=確實(shí)是不等的意思。
2016-10-18
第二個(gè)中的if里面應(yīng)該是continue吧