javascript to trigger onclick event code example Example: javascript trigger click on element document.getElementById('myElementID').click();