how to trigger button click event in javascript code example
Example 1: js trigger click
var element = document.getElementById('element');
element.click();
Example 2: js trigger click
<form>
<input type="checkbox" id="myCheck" onmouseover="myFunction()" onclick="alert('click event occurred')">
</form>