JSFiddle - React, Tailwind, and code Playground
by ChrisStanyon
JavaScript
var myURL="http://www.gstatic.com/dictionary/static/sounds/de/0/test.mp3";
$.ajax(myURL, {
cache: false,
dataType: "jsonp",
statusCode: {
200: function () {
alert('200');
},
201: function () {
alert('201');
},
400: function () {
alert('400');
},
404: function () {
alert('404');
},
304: function(){
alert("304");
}
},
success: function () {
alert("done");
},
error: function(){
alert("error");
}
});