私はphonegap+sqliteを使用しています。
何かを挿入しようとしています。
これがコードです-
function insertDB() {
var sqlI = "INSERT INTO post_data(post_text,pdate) VALUES("Hello, world","23-05-2012");
mydb.transaction(
function(transaction) {
transaction.executeSql(sqlI, [], nullDataHandler, errorHandler);
});
console.log("inserted");
window.location="dashboard.html";
}
window.location="dashboard.html"
回線を削除したり、1000msの遅延を設定して実行したりすると、データを挿入できwindow.location="dashboard.html"
ます。ただし、上記のコードは機能しません。なんで?