Home > Back-end >  (ask) about the choice of the checkbox
(ask) about the choice of the checkbox

Time:10-07

<script>
$(function () {
$(". NoPostage "). Checked (function () {
$(" # noPostage "). Attr (" value ", "true")
});
});
</script>




























Whether the package mail & lt;/span>





<% - & lt; tr>

Through the method of determine whether click here, then change the input to submit id=noPostage, but the results don't know why you don't succeed, is a method to write wrong

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 id

CodePudding 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
  • Related