samedi 22 août 2015

How can I modify my code to select specific checkboxes?

I want to write a simple javascript script to select from a large list of checkbox items on a website. Lets say I want to select the 3rd, 12th, and 25th checkbox. How would I do that? Right now it selects every item.

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();




Aucun commentaire:

Enregistrer un commentaire