Z
Z
Zorgios2018-10-05 22:51:12
JavaScript
Zorgios, 2018-10-05 22:51:12

How to simulate a click in the user's browser?

The site has text with a link
How to simulate a user click on this link, a few seconds after opening the page in his browser?
For example, the site loveto.pro, on the top left there is a link in the text.
How can I simulate this click after opening this site in the user's browser?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
profesor08, 2018-10-06
@profesor08

setTimeout(function() {
  let link = document.querySelector(linkSelector);
  link.click();
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question