我有一个Web服务,返回一个JSON编码的数据数组。然后,我使用jQuery的.each()
函数遍历该数组,但在Firefox中迭代,而在Chrome中迭代。更改为.each()在Firefox和铬
从Web服务来sback的数据是:
{
"data": {
"610": {
"id": "610",
"url": "a url 1",
"description": "XXX YYY",
"toc": "0000-01-00",
"active": "1"
},
"608": {
"id": "608",
"url": "a url 1",
"description": "ytttgffrr",
"toc": "0000-01-00",
"active": "1"
},
"607": {
"id": "607",
"url": "a url 3",
"description": "rtretert3",
"toc": "0000-01-00",
"active": "1"
},
"606": {
"id": "606",
"url": "a url 4",
"description": "xxxwwww",
"toc": "0000-01-00",
"active": "1"
},
...
}
}
火狐进入610 - > 606,而镀铬FORS 606 - > 610
任何想法,为什么和我能做些什么?
也许相关http://stackoverflow.com/questions/640745/google-chrome-javascript-associative-arrays-evaluated-out-of-sequence – 2012-03-23 16:48:38
http://stackoverflow.com/questions/648139/is-the在JavaScript中的对象可预测的时间顺序 - – Dogbert 2012-03-23 16:49:06