59 for (i=0; i < count; i++) //count = number of children
60 {
61 if (localXML.children()[i].Name.toString != firstName ¬
&& localXML.children()[i].Surname.toString != surName ¬
&& localXML.children()[i].Company.toString != companyName)
62 {
63 tempXML.appendChild(localXML.children()[i]);
64 }
65 trace("tempXML: --> "+tempXML);
66 localXML = tempXML; <---- WRONG PLACE!!!
67 }
大家好。我在第 61 行收到错误 #1010。
我确实单独测试了每个值,并且每个人都被正常跟踪。错误是:
- 类型错误:错误 #1010:在 ... frame9:61
- 该脚本总是附加 localXML.children()[0] 而不是别的。
我在那里看不到任何错误。任何想法?
提前致谢。
解决了:
59 for (i=0; i < count; i++) //count = number of children
60 {
61 if (localXML.children()[i].Name != firstName ¬
&& localXML.children()[i].Surname != surName ¬
&& localXML.children()[i].Company != companyName)
62 {
63 tempXML.appendChild(localXML.children()[i]);
64 }
65 }
66 trace("tempXML: --> "+tempXML);
67 localXML = tempXML; <---- MOVED HERE!!!
我在每个循环中都更新了 localXML !!!耻辱!!!