最近学习web相关的东西,nodejs+express写一个很简单的页面,输入文本框,然后一个查询按钮,点查询之后我可以重定向到其它页面或者本页面,但是不知道怎么把数据传到前端刷新页面,请大神指点下...
人生最曼妙的风景,竟是内心的淡定与从容!
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.
Recommend you to read this article: Express Framework
From the requirements, your request should be get, and you can pass the data from the background to the foreground through rendering
index is the rendered interface, followed by the data that needs to be passed.
Recommend you to read this article:
Express Framework