JSFiddle - React, Tailwind, and code Playground
JavaScript
jQuery.ajax({
url: 'http://www.404errorpages.com/',
dataType: 'jsonp',
statusCode: {
404:function() { alert("404"); },
200:function() { alert("200"); },
201:function() { alert("201"); },
202:function() { alert("202"); }
},
success: function(data) {
alert( "Status: " + data.status );
}
});