how to simulate a button click in javascript code example Example: js simulate click document.getElementById('elementID').click();