Jquery is a method that checks whether an input checked control is selected


Jquery checks if the input checked control is checked

Js part


function tongyianniu(){
var gouxuan=$('input[type=checkbox]').is(':checked');
alert(gouxuan);
}

HTML part


<input type="button" id="btnRegister" onclick="tongyianniu();" value=" test " />