Tag: 手机网站

NodeJS,分配名称/获取Jadecheckbox的值

我从Mongo数据库的表单中填充表格。 我希望用户能够select一个或多个checkbox,然后确定从表格中select了哪些项目。 问题的一个部分是,我不知道如何命名checkbox,因为它们是dynamic创build的。 我也不知道如何阅读checkbox属性。 我正在使用ExpressJS和翡翠。 我可以填充表没有问题,但不知道如何沟通哪些项目被选中。 这是我的玉 h1 index view form (method='post', action='/customers/check') fieldset legend Add a Customer div.clearfix -if(docs.length) table(style="border-left:1px solid black") tr th First Name th Last Name th "Hidden" each first in docs tr td #{first.first} td #{first.surname} td #{first.group} td div.input input(type="checkbox", name=(#{first.box}), unchecked= (true===true ? "checked" : "")).checkbox div.actions input(type='submit', […]