S
S
Saberwalker2017-12-10 12:42:51
Browsers
Saberwalker, 2017-12-10 12:42:51

How to change the text in a frame using JS?

Hello! Can you tell me why the code doesn't work? Website link
There is a payment page with a button whose text cannot be changed using JS. (I know that this is generated on the site, but I would like to know why it does not work) Here is the code:

<script type="text/javascript">
    function changeText(){
     	document.querySelectorAll('button2__text').innerHTML = 'Текст изменился';
      }
  </script>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
ru6ak, 2019-09-27
@ru6ak

You most likely have a nat provider and your router is also double nat.
You can solve the problem, for example, by buying a dedicated real ip from the provider, only your nat will remain.
Or change the provider to one who does not use nat and gives out real IP (dynamic or static does not matter).
Or maybe you put the router behind the router at home, then you will need to transfer one of the routers to bridge mode.
PS Describe the device of your network if you want answers on the merits, and just guess.

A
Andrey Barbolin, 2019-09-27
@dronmaxman

Write IP WAN, the first 2 values ​​are enough.

E
Eugene, 2017-12-10
@Saberwalker

Because there is such a thing as CORSyou cannot change something in someone else iframeif he did not give permission to change something through someRPC

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question