javascript click

JavaScript
const element = document.querySelector('element');
element.click();var button = document.getElementById("button");
button.click();document.getElementById("some_elment_id").click();document.addEventListener('click', function(e) {
    e = e || window.event;
    var target = e.target || e.srcElement,
        text = target.textContent || target.innerText;   
}, false);
Source

Also in JavaScript: