JSFiddle - React, Tailwind, and code Playground
by Extaze
HTML
<script src="https://raw.github.com/Extaze/fly.js/master/fly.js"></script>
JavaScript
var xhr = flyjs.ajax({
type: "post",
url: "register.php",
data: "user=root&passwd=toor",
async: false,
success: function (msg) {
alert(msg);
},
error: function () {
alert("There was an error !");
}
});
// This code will never be useful,
// because of async. Just some fun.
setTimeout(function () {
xhr.abort();
}, 2000);