jquery1-2.0.3.min.js:4 Uncaught TypeError: Cannot use 'in' operator to search for '150' in [{"id":1,"ip":"55.12.1.2","password":"*****************************"},{"id":3,"ip":"55.12.1.3","password":"*****************************"}]
解决方式是,先转成javascript对象
$.each(JSON.parse(data), function(i, item) {
// console.log(i)
// console.log(item)
// temp += "<option>" + item[index].ip +"</option>";
})
网友评论