我有一个使用sqlite进行存储的Jquery Mobile应用程序。以下函数成功从数据库查询中检索结果
function querySuccess(tx,result){
$.each(result.rows,function(index){
var row = result.rows.item(index);
});
}
我使用的是jquery v1.6.4。但是,当我将jquery更新为v1.9.1时,我收到错误“Uncaught TypeError:Item index必须是数字。”
答案 0 :(得分:1)
只是做:
function querySuccess(tx,result){
$.each(result.rows,function(index, row){
// Do what you want with your row variable here...
});
}