How to Submit Forms for Only Checked Items

  node.js, question


For example, the above figure is an order. Only two items are checked and then submitted. At this time, only the checked two items are submitted.
How can this selective submission be realized more simply?

Didn’t checbox have a checked attribute? First cycle through all checkboxes, and then judge the option whose checkboxes are true, just submit it.