JSFiddle - React, Tailwind, and code Playground
HTML
<button>Request for ajax</button>
JavaScript
function Create_new_event() {
url = "missing.php";
$.post(url, {}, function (hasil) {
alert(hasil);
});
}
$(function () {
$('button').click(function(){
Create_new_event();
});
$(document).ajaxError(function (event, request, settings, thrownError) {
console.log(request.status + ' : ' + thrownError);
});
});