javascript:[].forEach.call(document.querySelectorAll('input[type="checkbox"]'),function(el){el.checked=true});
*** Will not work for older versions of (Internet Explorer) IE
(1) document.querySelectorAll not available untile IE v8
(2) forEach not available until IE v9
The use of a JavaScript toolkit/framework, e.g., JQuery, relieves the developer from having to worry about incompatibility issues like the ones mentioned above.
Verify that your browser didn't automatically remove the "javascript:" from its address bar, assuming you copy/pasted the javascript. If so, then just hand-type javascript: at the beginning and press your enter key.
Test it out here:
Alice
Bob
Cindy
JQuery Set all Checkboxes Version
If the page already has JQuery loaded, then you have less to type...
javascript:$(":checkbox").prop("checked", true);
That's because this page is not using (and has not loaded) the JQuery library.
So, to dynamically load JQuery on a page, e.g., this blog page, paste the following in the address bar:
javascript:(function () {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js';
document.getElementsByTagName('body')[0].appendChild(s);
})();$(":checkbox").prop("checked", true);