【发布时间】:2016-02-07 09:49:32
【问题描述】:
我在翡翠中有一个提交按钮(代码如下):
p
a(href='/commands/new')
button.btn.btn-primary(type='submit')
i.glyphicon.glyphicon-plus
| Add commands
调用控制器代码:
router.get('/new', function(req, res) {
console.log("inside commands.js controller");
// custom biz logic here...
// need to get the value of the key passed to the controller when someone hits the "Add commands" button above
});
我想在按下添加命令按钮时将一些数据传递给控制器。我怎样才能做到这一点?
【问题讨论】:
-
你有没有想过这个问题?
标签: javascript node.js express pug