JSFiddle - React, Tailwind, and code Playground

HTML

Fiddle for http://stackoverflow.com/questions/5626168/automating-a-javascript-button-click<br />

<a href="#" onclick="document.getElementById('theSubmitButton').click(); return false;">Click to simulate a click on below button</a>

<button onclick="alert('hey');" id="theSubmitButton">button</button>