HTMLElement.click() method simulates a mouse click on an element.
click() is used with supported elements (such as an
<input>), it fires the element's click event. This event then bubbles up to elements higher in the document tree (or event chain) and fires their click events.
In HTML, it will look something like this.