First page Back Continue Last page Overview Graphics
Web DB(三)
- 取得SQL資料
db.transaction(function (tx) {
tx.executeSql('select * from std', [],
function (tx, results) {
var len = results.rows.length, i;
var ans ="總共 "+len+" 筆<br/>";
for (i = 0; i < len; i++){
ans=ans+results.rows.item(i).name+" "+results.rows.item(i).sex+" "
+results.rows.item(i).school+" "+results.rows.item(i).dep+"<br/>";
}
alert(ans);
}, null);
});