$(function () {
$(". NoPostage "). Checked (function () {
$(" # noPostage "). Attr (" value ", "true")
});
});
</script>
Whether the package mail & lt;/span>
<% - & lt; tr>
Detailed information to fill out
CodePudding user response:
Click you should not use the click event? Then through the name attribute modify $(" input [name='noPostage'] "). The attr (" value ", true), and you bind the event with the class selector, the following assignment will use the id selector, but none of this idCodePudding user response:
May I describe a bit of a problem, I defined a hidden id="noPostage" input to database and true or false value (not for the bool), and then defines a checkbox, I hope I can pass this checkbox. Checked method can will hide the input id="noPostage" value is set to true, but I don't know why not, if the checkbox can also be selected under the click event, I change a try