var db = openDatabase('kcK.sqlite', '1.0', 'Test DB', 2 * 1024 * 1024); var msg; function data(){ var name1=document.getElementById("name").value; var marks2=document.getElementById("marks").value; db.transaction(function (tx) { tx.executeSql("CREATE TABLE IF NOT EXISTS database"+"(word VARCHAR(50),"+"definition VARCHAR(50) NOT NULL)"); tx.executeSql('INSERT INTO database(word,definition)VALUES(?,?)',[name1,marks2]); }); } function kamal(){ db.transaction(function (tx) { tx.executeSql('SELECT * FROM database', [], function (tx, results) { var len = results.rows.length, i; msg = " Found rows: " + len + "
"; document.querySelector('#status').innerHTML += msg; for (i = 0; i NAMEMARKS'+msg+''+marks+''; } }, null); }); } function update(){ //plz tell code } function delete(){ //plz tell code } Name:
Aucun commentaire:
Enregistrer un commentaire