How can I get a checkbox’s value in jQuery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
To check whether it is checked or not, do:
To get the value of the Value attribute you can do something like this:
Or if you have set a
classoridfor it, you can:However this will return the same value whether it is checked or not, this can be confusing as it is different to the submitted form behaviour.