I am new to javascript so please be mindful of that.
This is the button I want to click using a script I'm designing.
I'm trying to click the button but the only way I know how to is by using the click function like this. document.getElementsByClassName('Thing-I-want-to-click').click(); I opened up inspect element and saw that the button I was trying to click had no onClick attribute. I'm using discord through the web browser and would like to just be able to simulate the click on the button using JS.
document.getElementsByClassName('Thing-I-want-to-click').click();
Here is a test server I made to look at the inspect element for yourselves.
This is the inspect element of the button.
2.1m questions
2.1m answers
60 comments
57.0k users