Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer peopleโ€™s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer peopleโ€™s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8445865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:46:18+00:00 2026-06-10T09:46:18+00:00

assuming the following code: <input type=checkbox name=categories[9507]> is there a javascript command that can

  • 0

assuming the following code:

<input type="checkbox" name="categories[9507]">

is there a javascript command that can simply select every checkbox like that on the page? the name’s change slightly in numbers only.

I need to select around 15000 on a page, without a select all available ๐Ÿ™

(something that I could put into a bookmark and click, or console of firebug would be best)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:46:20+00:00Added an answer on June 10, 2026 at 9:46 am

    Pure JS, modern browsers-only (IE 8+, FF 3.5+, Opera 10+, Safari 3.2+, Chrome 1+):

    (function() {
        var chs = document.querySelectorAllโ€‹('input[type="checkbox"][name^="categories"]')โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹;
        for (var i=0; i<chs.length; i++) chs[i].checked = true;
    }());
    

    Fiddle

    QSA Reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing some code that highlights all <input type=radio /> within a radio group
Assuming following code. There is class MyStream witch has template overloaded operator <<. There
Hey there, assuming I have the following code in a mex routine: mxArray *newPoint
Assuming A.sql contains the following code, then second Select query wonโ€™t be executed due
assuming the following html (minus the comments and nbsp; etc that xQuery wont process
Assuming the following selector $(div span:first-child) applied in following html code John, Karl, Brandon
Is the following code guaranteed by the standard to work(assuming st is not empty)?
Please consider the following signup: <form wicket:id=form> <div wicket:id=fooList> <input wicket:id=fooList.quxField type=text size=10/> </div>
Possible Duplicate: A question about union in C Assuming the following code: #include <stdio.h>
The following code does not compile. type A(?arg) = member __.Arg : string option

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.