最近学习web相关的东西,nodejs+express写一个很简单的页面,输入文本框,然后一个查询按钮,点查询之后我可以重定向到其它页面或者本页面,但是不知道怎么把数据传到前端刷新页面,请大神指点下...
迷茫2017-04-17 11:39:03
From the requirements, your request should be get, and you can pass the data from the background to the foreground through rendering
app.get('/u/name',function(req,res){
res.render('index',{
name:"xxx",
title:"xxx"
});
});
index is the rendered interface, followed by the data that needs to be passed.