JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://lab.hakim.se/ladda/dist/spin.min.js"></script>
<script src="http://lab.hakim.se/ladda/dist/ladda.min.js"></script>
<link rel="stylesheet" href="http://lab.hakim.se/ladda/dist/ladda.min.css">
<form action="/echo/json/" method="post" >
<input type="text" name="lname" />
<input type="text" name="fname" />
    <input type="button" name ="send" onclick="return f(this.form ,this.form.fname ,this.form.lname) " />
</form>

JavaScript

function f(form ,fname ,lname){
    att=form.action;
    $.post(att, {fname: fname.value, lname: lname.value}).done(function(data){
        alert(data);
    });
    return true;
}