Today, I read the jquery manual, a little bit more understanding of the prop () function, and a record of memory.
Prop (): Gets the value of the first element in the matching element set
Determine if the first one in the checkbox is selected:
$ (": CheckBox"). Prop ("checked"); Returns False if the first checkbox is selected to return true.
Disable and select all check boxes on the page:
$ ("input[type= ' checkbox ']"). Prop ("Disabled", true);
$ ("input[type= ' checkbox ']"). Prop ("checked", true);
Select all the check boxes on the page:
$ ("input[type= ' checkbox ']"). Prop ("Checked", function (I, Val) { //i: Index Val:true/false (selected to True, otherwise false)
return!val;
});
This jquery implementation of the prop () function control multiple-selection box (select, reverse) is a small series to share all the content, hope to give you a reference, but also hope that we support the cloud-dwelling community.