The moment the window changes in Javascript, the behavior stops.

Asked 5 months ago, Updated 5 months ago, 10 views

varkakunin=(function(){n= document.getElementsByClassName("js-validator-form");n[0].submit()}); 
setTimeout (kakunin, 2000);
$('input[value="Are you sure?" ] ).click();

After executing the above code on a certain site, move to setTimeout(kakunin,2000); and $('input[value="Are you sure?"]').click(); part did not work.

It worked well when I manually proceeded with the second line and operated only the third line.
Why doesn't the third line work the moment the window changes?


2022-09-30 13:44

1 Answers

$(document).ready(function(){$('input[value="Are you sure?"]").click(function() {alert('Isn't it working just because it's not written?'); }); });

2022-09-30 13:44

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.