JSFiddle - React, Tailwind, and code Playground

HTML

<form id="form1">
    First Name <input name="first"/>
</form>
<form id="form2">
    Last Name <input name="last"/>
</form>
<button>Submit</button>

JavaScript

$(function() {
    $('button').click(function(e) {
        var form1 = $('#form1');
        var form2 = $('#form2');
         $.ajax({
             type: "POST",
             url: '/echo/html/',
             data: form1.serialize()+"&"+form2.serialize(),
             success: function (result) {
                 alert(result);
             }
         });
    });
});