How to get 406 Error (not acceptable) in jquery
问题 I am doing error handling in my.js, where i am having cross domain call to other server, also for dynamic HTML template i am using Mustache.js. $.getJSON(url, function(data, textStatus, xhr) { $.each(data, function(i, data) { introPage(data); }); }).fail(function(Error) { alert(Error.status); }); function introPage(data ) { $.getJSON('myphp.php?jsoncallback=?&template='+testTemplate, function(msg) { // my operations }).error(function(data) { }); } We have .fail() in getJSON to catch the