JSFiddle - React, Tailwind, and code Playground
HTML
<form id="submform">
<input type="text" name="author1" value=""></input>
<input type="text" name="author2" value=""></input>
<input type="text" name="author3" value=""></input>
<input type="text" name="author4" value=""></input>
</form>
<button type="button" id="t">Test Serialize</button>
<br/>
<span id="serializeOutput" />
JavaScript
function x(){
return $('#submform input').serialize();
}
$('#t').click(function(){$('#serializeOutput').text('Serialized form: "' + x() + '"');});