if 語句 的執行問題
if(content.childNodes[i].nodeType=1){
content.removeChild(content.childNodes[i]);?
}
和
if(content.childNodes[i].nodeType!=1)
{continue;}
else{
content.removeChild(content.childNodes[i]);?
}
有啥區別呢 結果運行不一樣
if(content.childNodes[i].nodeType=1){
content.removeChild(content.childNodes[i]);?
}
和
if(content.childNodes[i].nodeType!=1)
{continue;}
else{
content.removeChild(content.childNodes[i]);?
}
有啥區別呢 結果運行不一樣
2016-10-17
舉報
2016-10-18
判斷的時候if里面等號應該是==或是===
=是賦值吧 !=確實是不等的意思。
2016-10-18
第二個中的if里面應該是continue吧