over 5 years ago
While working in a project, I got stuck in the following issue.
This is the code I am using:
<input type="radio" name="optionsRadiosbillingmethod" id="optionsRadios1-billing-method" value="option1-billing-method" class="required">
This is my Checkbox, I wan't to check wether this checkbox is selected or not using jquery and if it is selected then I wan't its value in my .js file using jquery.
Anybody have some idea, how to acheive this.... Thanks in Advance..!
With an ID
$('#' + id).is(":checked")
If you want to check by name
var $boxes = $('input[name=thename]:checked');
where "thename" is the name of the checkbox.
Checking by name come in handy if you have multiple checkboxes to check
If you have an array of checkboxes with same name(creating a checkbox list),you can loop like following.
//do stuff here with this
And for checking that how many of them are checked in the list:-
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Terms of Service
| © copyright 2020 FindNerd.com. All rights reserved.
Sign up using