router.get('/error', function (req, res) { res.render('error', { title: 'error' }); });
问题一:html中如何加载上面的title。
问题二:在js中如何获取到render的数据。
html中的代码
1、<title>title</title> 2、<title>{{title}}</title> 3、<title>#{title}</title>
以上三种好像都不对!
认证高级PHP讲师
The method of obtaining the background variable value depends on the template you select. In html, of course, select <%=%> to get the background variable value.
<%= title %>
. . .
What template are you using?
The method of obtaining the background variable value depends on the template you select.
In html, of course, select <%=%> to get the background variable value.
<%= title %>
. . .
What template are you using?