level 1
maddylin
楼主
function showAllData(){
db.transaction(function(tx){
tx.executeSql('create table if not exists msgData(name Text,message Text,time Integer)',[]);
tx.executeSql('select * from msgData',[],function(tx,rs){
removeAllData();
for(var i=0;i<rs.rows.length;i++){
showData(rs,rows.item(i));
}
});
});
}
我想请教下编程高手,这段代码中函数function的参数tx和rs是什么意思,谁懂得能告诉我吗?谢谢!
2017年04月07日 06点04分
1
db.transaction(function(tx){
tx.executeSql('create table if not exists msgData(name Text,message Text,time Integer)',[]);
tx.executeSql('select * from msgData',[],function(tx,rs){
removeAllData();
for(var i=0;i<rs.rows.length;i++){
showData(rs,rows.item(i));
}
});
});
}
我想请教下编程高手,这段代码中函数function的参数tx和rs是什么意思,谁懂得能告诉我吗?谢谢!