How jQuery determines whether check boxes are checked or not

  • 2020-03-30 03:01:05
  • OfStack

One of the things we're going to do today is assign a value to the input form when the checkbox is checked, and clear the form value when the checkbox is checked.

The effect is as follows:
< img SRC = "border = 0 / / 2014421161639 ">  
Implementation source code: cyfID for the check box id
var ischeck=$(this).attr("checked"); 
//Clear the input box
//Assign a value to the input field

$(this).attr("checked") is checked and undefined when checked.

Related articles: