摘要:
var tbName="tableName"; var tdName=["id","th1","th2","th3"]; var strSQL="select * from "+tbName+" where id="+1; //从web sql数据库获取数据; function getWebSqlData(strSQL,tbName,tdName){ db = openDB(); ... 阅读全文
posted @ 2018-01-11 13:41
履霜.1989
阅读(968)
评论(0)
推荐(1)
摘要:
//删除web sql数据表 function btnClearDBtable(tbName){ db = openDB(); if(db){ var strSQL="drop table "+tbName; db.transaction(function(tr) { tr.executeSql(strSQL,[], ... 阅读全文
posted @ 2018-01-11 13:24
履霜.1989
阅读(536)
评论(0)
推荐(1)
摘要:
//新建web sql数据库数据表var tbName="tableName";var strSQL="create table if not exists tableName (id unique,th1,th2,th3)";function creatBDTable(strSQL,tbName){ db = openDB(); db.transaction(function(... 阅读全文
posted @ 2018-01-11 10:33
履霜.1989
阅读(426)
评论(0)
推荐(0)
摘要:
//更新数据表数据。 var strSQL = "update tableName set th1=?,th2=?,th3=? where id=?"; var info=[1,1,1,1]; function updateInfo(strSQL,info){ db = openDB(); if (db) { db.transaction(function(tr)... 阅读全文
posted @ 2018-01-11 10:24
履霜.1989
阅读(411)
评论(0)
推荐(0)

浙公网安备 33010602011771号