Friday 19 March 2021

Changing input text using javascript (jquery)

I am trying to change the input text (total INR) of the input field in this page https://wazirx.com/exchange/BTC-INR by doing:

$(".cKOnhg").last().attr('value', Math.random() * 100000);

When inspected the "value" attribute of the input changes to a random number, however it automatically changes back to 0 (or the number that was manually inputted) after few seconds.

I have tried trigger() and the sendkeys plugin mentioned here: https://stackoverflow.com/a/13946504/82985

Nothing seems to work. Is it even possible on this page to change the input value exactly like how a human would do?

I'm trying to change the input values and auto-submit the form.



from Changing input text using javascript (jquery)

No comments:

Post a Comment