How to click on this button by using javascript which is mentioned in the below code

38 Views Asked by At

Provide me the javascript which I could run in the console window such that it clicks on the button automatically.

<button value="1" class="button_confirm" type="submit">Confirm</button>
1

There are 1 best solutions below

8
Nishesh Pratap Singh On BEST ANSWER

Give some id to button, for example button1 and then run the code below in console :

document.getElementById("button1").click();