JSFiddle - React, Tailwind, and code Playground

HTML

<form id="form-select">
<input type="button" value="Submit" />
</form>

JavaScript

$(document).on("click","#form-select", {foo: "bar"},SubmitForm);
function SubmitForm(event)
{ 
    alert(event.data.foo); 
}