samedi 18 juin 2016

jQuery CheckBox Selector .attr('checked) is not working?

I have a checkbox called chkBox1 and i want assign a variable true or false as per the value of selected checkbox.

<input type="checkbox" id="chkBox1">

var chkBox1Val = $('#chkBox1').attr('checked') ? true: false;




Aucun commentaire:

Enregistrer un commentaire