Cannot read property 'push' of undefined
浏览器报错是这样的  但是我ALERT其中的属性是可以出来的   

解决方案 »

  1.   

    在前面定义了 ,就写了个  VAR IPLOCATION;  有错么
      

  2.   

    var iplocation=[]; 这样写
      

  3.   

    哦  有个eval那个好像可以转为数组,但是我试过了 不行唉    大神   指点下迷津吧
      

  4.   

    var iplocation = new Array();
      

  5.   

    var iplocation=[];
      for (var i = 0; i < data[0].length; i++) {
     var s={};
     var s2={};
     s2.id=data[0][i ].Id;
     s2.root=data[0][i ].ROOT;//有几个写几个
     s1[data[0][i].Name]=s2;
              
            }iplocation.push(s);
      

  6.   

    这样 的  。var s={};
      for (var i = 0; i < data[0].length; i++) {
     
     var s2={};
     s2.id=data[0][i ].Id;
     s2.root=data[0][i ].ROOT;//有几个写几个
     s[data[0][i].Name]=s2;
              
            }
      

  7.   

    ouch。!到我这是不是就真的结贴!