Execute Query $ ("#btnSQL"). Tap (function () {<span style= "white-space:pre" ></span>var db = OpenDatabase (' MyDB ', ' 1.0 ', ' Test DB ', 2 * 1024 * 1024); Db.transaction (Function (TX) {<span style= "White-space:pre" ></span>tx.executesql (' CREATE tabl E IF not EXISTS testhtml (id unique, contenttext) '); <span style= "White-space:pre" ></span>tx.executesql (' insert into testhtml (contenttext) VALUES (' Insert Data test1! ");}); <span style= "White-space:pre" ></span>db.transaction (function (TX) {tx.executesql (' SELECT * from Testhtml ', [],function (Tx,result) {<span style= "white-space:pre" ></span>var len=result.rows.length; <span style= "White-space:pre" ></span>app.alert (len); <span style= "White-space:pre" ></span>var str=result.rows.item (0); <span style= "White-space:pre" ></span>app.alert (Str.contenttext); <span style= "White-space:pre" ></span>},null); <span style= "White-space:pre" ></SPAN>}); });
JS HTML5 Operation SQLite