Selecting all checkboxes on a page with the Developer Console

Oh Dear monitors your entire site, not just the homepage. We crawl and search for broken pages and mixed content, send alerts when your site is down and notify you on expiring SSL certificates.

Start your free 10 day trial! »

Profile image of Mattias Geniar

Mattias Geniar, May 03, 2020

Follow me on Twitter as @mattiasgeniar

A quick reminder to myself that the Developer Console in Chrome or Firefix is useful to mass-select a bunch of checkboxes, if the site doesn’t have a “select all”-option (which really, it should).

Here are the steps to get all checkboxes on a page, checked:

  1. Right click anywhere on the page
  2. Hit “Inspect”
  3. Go to the “Console”

In there, copy/paste this and hit Enter:

$$('input[type="checkbox"').map(i => i.checked = true)

To test them out, here are some random checkboxes.

Check 1

Check 2

Check 3

Hope it saves you some time!

Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.