前端传给后端的参数有可能在这几个地方:
1,req.params.old_id2,req.body.old_id3,req.query.old_id
form:post是这样的
app.post(‘/update/:old_id‘,function(req,res,next){ ???var old_id = req.params.old_id; ???console.log(old_id) ???console.log(req.body);});
ajax:post方法是这样的:
app.post(‘/post_opra_record‘,function(req,res){ ???console.log(req.body);})
以上是自己总结的,也许有偏差,本身对express还不是很熟悉;
express form/ajax 后端获取前端数据
原文地址:http://www.cnblogs.com/aiyr/p/7801551.html