Insert title here
//创建数据库:数据库名称,版本,表明,大小
var db=openDatabase("myDB","1.0","test db",2014*10);
function Add(){
db.transaction(function(fx){
fx.executeSql("create table if not exists UserInfor(UserName TEXT,Pwd TEXT)",[]);
//获取
var username=$("#txtAUserName").val();
var pwd=$("#txtAPwd").val();
fx.executeSql("insert into UserInfor values(?,?)",[username,pwd],function(){
alert("添加成功");
});
});
}
原文:http://www.cnblogs.com/gf36500/p/6869379.html