-7

Is there any way to simulate a click of a button with the id 'id' in Javascript or jQuery? Thanks

1

1 Answer 1

0

You could use:

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

You would still need to bind this to an event. My question would be why do you want to simulate the button click? Why not call the function behind the button instead?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.