我收到以下错误:
未捕获的错误:INVALID_STATE_ERR:DOM 异常 11
尝试执行查询时收到此错误消息。
有没有人遇到过同样的问题?
function populateDB(tx) {
tx.executeSql('DROP TABLE IF EXISTS ORDERS');
tx.executeSql('CREATE TABLE IF NOT EXISTS ORDERS (id INTEGER PRIMARY KEY, client_ID, status)');
var myurl="xml.xml";
$.ajax({
type: "POST",
url: myurl,
dataType: "xml",
success: onSuccess
});
}
function onSuccess(xml) {
$(xml).find('articles').each(function () {
var idord = $(this).attr('id');
var esql ='INSERT INTO ORDERS (id, client_ID, status) VALUES ('+idord+', 4, "done" )';
var nameclient = $(this).find('name').text();
$('.items').append('<h2>'+ nameclient '</h2>').appendTo('#xml-data');
tx.executeSql(esql) ;
});
}