JQuery using a very simple method to call GET and transfer data using a json program But the error was constantly running, then IE tells me "SyntaxError"
But I deleted the data parameter in order ...
Please help us see, in the end, the problem? Thank!
var url = "/demo/test.do";
$.ajax({
url: url,
method: "GET",
dataType: "json",
data: jQuery.parseJSON('[{"dispatch" : "add"}]'),
success: function(data) {
alert(data);
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
}
});
source
share