E
E
Endru2017-04-12 12:27:01
JavaScript
Endru, 2017-04-12 12:27:01

JS: Finding a button by type?

There is a button type="submit' button on the site, you need to click on it with the help of JS, how can you refer to the element by type ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lemme, 2017-04-12
@EndruAN

document.querySelector('button[type="submit"]').click()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question