用“for”破坏移动Safari / 533.1迭代对象

时间:2013-07-12 22:42:26

标签: javascript mobile-safari

我觉得这很直截了当。不知道为什么这会导致Mobile Safari出现问题。

var rowIndexArr = [];
var rowDatas = {"11480":{"tags":["Automotive"]}};
alert('still working'); // <-- works fine   
alert(rowDatas[11480].tags[0]) // <-- will alert "Automotive";

// what appears to be breaking the code
for(var index in rowDatas){
    rowIndexArr.push(index);
}


alert('still working?');  // <-- dead at this point.

0 个答案:

没有答案