我想从表单中获取表单输入,并使用expressjs将其注入到get请求中。不太清楚该怎么做。我做了一个plnkr。我真的不希望答案指向正确的方向,因此一些阅读资源会很棒。
[enter code here][1]
答案 0 :(得分:0)
我会使用查询字符串来传递您需要的数据。
.post('/', function(res,req){
res.redirect('/?data=' + req.body.data);
})
答案 1 :(得分:0)
.post('/', function(rgvfbbgbvbves,req){
req.body // this will give you all of the relevant POST
// this is where i need help i think
res.redirect('/');
})