lundi 24 août 2015

Selecting checkboxes using a script on a third party website

I'm trying to use jQuery to create a script that will select specific checkboxes on this page. I can't seem to figure out how to select specific ones, it seems not matter what I've tried it's not selecting the correct one from the list. Looking at the code, they use checkRole(#) for 80 something checkboxes. What can I do to modify this code to select, for example, the 3rd, 10th, and 20th checkbox?

Here's my code:

var script = document.createElement('script');
script.src = 'http://ift.tt/ILQp6H';
script.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(script);
$("#detail input:checkbox").click();

And heres a link to the offline html of the site I'm trying to do this one:

http://ift.tt/1LvBmB7

It's a 3rd party site and I'm not able to modify their code.




Aucun commentaire:

Enregistrer un commentaire