我 在客户端用 <form action="/userInfo" method="post" name="basicInfo"> 然后 服务器端用 app.post('/userInfo’,routes.userInfo); 这个来处理。 处理函数: exports.userInfo = function(req,res) { var info = {}; info.age = req.body.age; //get form data from client info.sex = req.body.sex; info.weight = req.body.weight; info.height = req.body.height; info.email = req.body.email; info.password = req.body.password;
mogodb.info = info;
console.log(info);
console.log(req.query);
res.end();
};
现在问题是,上传完成之后页面会发生跳转,而我的功能只是上传下数据而已,不希望跳转,我应该怎么做呢?