我正在开发一个程序,该程序在给定列表的末尾插入一个节点。由于某种原因,我的代码不适用于只有一个节点的列表。有人可以指出原因吗?
c.prototype.isitReal=function(t){
var matched = false;
this.each(function(item){
// convert the function to an expression of a function
// by wraping the entire function in ( )
(function getChildren(el){
....
getChildren(el[a].children);
....
// then invoke the function expresion by adding ()
// to the end. Pass in any arguments here also
})(el.children,arg2,arg3);
});
return matched;
};