我想根据checkbox click/unclick事件设置一个变量(pageselected).
<thead>
<tr id="othercheckbox">
<th width="10"><input type="checkbox" name="zip" class="all" value="all" /></th>
</tr>
</thead>
Run Code Online (Sandbox Code Playgroud)
$('#othercheckbox').click(function() {
if($(this).is(':checked')){
console.log("CCCCheckeddddddd");
that.pageselected = true;
}
else
{
console.log("UNCheckeddddddd");
that.pageselected = false;
}
}
Run Code Online (Sandbox Code Playgroud)
但这并不像预期的那样.我哪里错了?