Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
142 views
in Technique[技术] by (71.8m points)

javascript - How to simulate click on chrome

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.

Here is a test server I made to look at the inspect element for yourselves.

This is the inspect element of the button.

question from:https://stackoverflow.com/questions/65866338/how-to-simulate-click-on-chrome

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...