JSFiddle - React, Tailwind, and code Playground
by Simon Price
HTML
<input type="Button" id="bttn" value="this is a button"/>
<input type="Button" id="bttn2" value="this is a button"/>
JavaScript
document.getElementById("bttn").onclick = function fun()
{
alert("hello");
simulateClick()
//validation code to see State field is mandatory.
}
function simulateClick(){
alert("2");
$("#bttn2").click();
};