How to click for example on a button on a foreign site <span class="left_label inl_bl">кнопка</span> from your resource or local computer using javascript? I do not understand how to work with the console or sniffers to analyze requests.

  • 2
    in principle - no way. - Grundy

1 answer 1

Concerning work with the console. We write in the console:

 document.getElementsByClassName("left_label")[0].click(); 

or

 document.getElementsByClassName("inl_bl")[0].click(); 

or

 document.querySelector(".left_label").click(); 

or

 document.querySelector(".inl_bl").click(); 

and hit enter .

  • It's clear. I didn’t correctly set the thieves from a local computer or server on a different domain.
  • And how can I submit JS requests without loading the html structure? - Oleg
  • using frames if the site does not prohibit. or ayaks requests. Are there any other ways? - Denis Evseev
  • They also do it in JScript, (this is not JavaScript) and also with the help of desktop programs. For example, the AddNews program for publishing news on sites. - Oleg