How to send an HTML5 sqlite result set to a server via AJAX
Suppose I'm getting a result set like so:
db.transaction(
function(transaction) { transaction.executeSql(
'SELECT col1, col2, col3 FROM table;',
[],function(transaction, result){
//package the result in here somehow to send to the server via AJAX
},errorHandler);
I'm looking for the specific code (as opposed to say "serialize the result") for the best way to 'package' the result to be send via AJAX to a serv开发者_StackOverflow中文版er. A JQuery solution is fine.
There is a common solution for serializing in JS:
JSON.stringify(result);
精彩评论