Can you tell me the source code that automatically presses the button on the side with JavaScript code? I'm making it. If you continue to go to the website, you'll automatically go to the site you've linked to.
Asked
Active
Viewed 33 times
-4
-
Possible duplicate of [How to simulate a click with JavaScript?](https://stackoverflow.com/questions/2705583/how-to-simulate-a-click-with-javascript) – Sterex Feb 13 '19 at 08:54
1 Answers
0
document.getElementById('goButton').click();
<button type="submit" id="goButton" >Button</button>
Dananjaya Ariyasena
- 586
- 2
- 15