在 PUG 中为 bootstrap table 中的每条记录添加一个删除按钮
add a delete button for every record in a bootstrap table in PUG
我正在尝试为 bootstrap 中的每条记录添加一个按钮 table 我正在使用哈巴狗模板 engine.its 似乎标签没有 working.Please 帮助
.jumbotron
h1 User Report
.container
table.table
thead
tr
th(scope='col') Name
th(scope='col') Student ID
th(scope='col') Department
th(scope='col') Edit
tbody
each x,i in info
tr
th(scope='row')= x.name
td= x.studentID
td= x.dept
td= input.btn.btn-primary(id='info.id', type='button', value='Delete')
如果要将 input
嵌套在 td
中,请在 td
下缩进 input
,如下所示:
.jumbotron
h1 User Report
.container
table.table
thead
tr
th(scope='col') Name
th(scope='col') Student ID
th(scope='col') Department
th(scope='col') Edit
tbody
each x,i in info
tr
th(scope='row')= x.name
td= x.studentID
td= x.dept
td
input.btn.btn-primary(id= info.id, type='button', value='Delete')
我正在尝试为 bootstrap 中的每条记录添加一个按钮 table 我正在使用哈巴狗模板 engine.its 似乎标签没有 working.Please 帮助
.jumbotron
h1 User Report
.container
table.table
thead
tr
th(scope='col') Name
th(scope='col') Student ID
th(scope='col') Department
th(scope='col') Edit
tbody
each x,i in info
tr
th(scope='row')= x.name
td= x.studentID
td= x.dept
td= input.btn.btn-primary(id='info.id', type='button', value='Delete')
如果要将 input
嵌套在 td
中,请在 td
下缩进 input
,如下所示:
.jumbotron
h1 User Report
.container
table.table
thead
tr
th(scope='col') Name
th(scope='col') Student ID
th(scope='col') Department
th(scope='col') Edit
tbody
each x,i in info
tr
th(scope='row')= x.name
td= x.studentID
td= x.dept
td
input.btn.btn-primary(id= info.id, type='button', value='Delete')