这个是代码片段: this.add(this.items);
alert('ok--------')
},
add: function(item, scope){
scope = scope || this;
if($.isArray(item)){  //--------------数组形式
for(var i=0,len=item.length; i<len; ++i){
arguments.callee(item[i], this);
}
return;
}
if($.isPlainObject(item)){  //-------简写形式
if(item==='-'){
item = new Toolbar.items.Separator();
}else if(item.type){
item = new Toolbar.types[item.type](item);
}
}else{  //----------------------------实例形式
if(item.type==='panel'){ //容器型组件
scope.addPanel(item.align, item.doc);
}else{                   //单一组件
scope.jCell = $('<td></td>');
item.appendTo(scope.jCell);
if(item.align==='right'){
scope.jRight.prepend(scope.jCell);
}else{
scope.jLeft.append(scope.jCell);
}
}
}
alert('ok')
},
一直在FF开发,今天在IE一测试,不好使了虽然是预料中的事,不过原因太蹊跷了啊上面的代码在FF打印   ok     ok---------
在IE就打印  ok  然后报错  'type'为空或不是对象高手高手,传说中的高手们帮我看看啊~~

解决方案 »

  1.   

    谁能告诉我
       从 alert('ok')
       到 alert('ok--------')
    这段时间,IE到底做了些什么啊??????????????
      

  2.   

    我把这段注释掉在IE就没事了。        if($.isArray(item)){  //--------------数组形式
                for(var i=0,len=item.length; i<len; ++i){
                    arguments.callee(item[i], this);
                }
                return;
            }
      

  3.   

    arguments.callee(item[i], this);
    =>
    arguments.callee(item[i], scope);
      

  4.   

    極度不明真相的群眾來圍觀了:
    這是什麽?LZ還讓咱們猜吧?
     if(item==='-'){
                    item = new Toolbar.items.Separator();
                }else if(item.type){
                    item = new Toolbar.types[item.type](item);
                }
      

  5.   

    可以啊,不管我测试哪个分支,都能进去,一切看着正常,最后的  ok  IE也会打出来,然后不就是执行
    alert('ok--------')了吗?居然没有
      

  6.   

    你alert(item) alert(item.type)看都是什么