lundi 16 novembre 2015

How to get check status for check box in jquery

I have a check box as follow.

<input id='showDeletedQuestionsId' name='showDeletedQuestions' type='checkbox' style='margin-right: 3px' />""

I want to know if it is checked in jquery. The code is:

    var showDeletedCheckbox = $('#showDeletedQuestions').is(':checked');

However, I notice that it always returns false even if check box is checked. I'd like to know how to get the check status in jquery.




Aucun commentaire:

Enregistrer un commentaire