如何将文本框值从Jade发送到node.js
form(action='/send', method='POST')
pre
label From :
input(type='text',id="Fromtime", name='f1_time')
br
label To :
input(type='text', id="Totime", name='t1_tdime')
br
br
br
label On :
input(type='radio', name='on', id='amount_0')
label Off:
input(type='radio', name='off', id='amount_1')
br
br
br
input(type='submit', value='Send !')
如何使用module express
来使用app.js中文本的值由于
答案 0 :(得分:0)
app.js
app.post('/send', function(req, res) {
console.log(req.body.f1_time); // show the value of the text box
});