在index.html布局中渲染该值后,我在变量{action:'page1.html'}中设置了值,然后我想使用动态包含页面但不起作用。
router.get('/', function(req, res, next) {
console.log(req.query.action);
res.render('users/index', {action:'page1.html'});
});
**index.html**
<% include+"./"+action %>
请推荐..
最佳答案
关于node.js - 如何在node.js的html页面中包含动态html文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31957373/