【发布时间】:2016-05-26 22:11:00
【问题描述】:
table(class= "table-striped table-striped table-hover")
thead
th
h2 #{movie.title}
tbody
tr
td
b Tagline : #{movie.tag}
br
b Rating : #{movie.rating}
br
b Synopsis :
p #{movie.overview}
b Available Copies : #{movie.copies}
br
input.btn-danger.btn-sm(type="submit", value="Buy")
td
img(src= movie.poster width="250" height="300")
p
a.btn.btn-info(href='http://www.imdb.com/title/'+movie.movie_id) Watch Trailer »
#{ } 值来自 Mysql 表。提交此页面后,我想重用 #{movie.title} #{movie.tag}
在 Node.js 控制台中。比如我想做console.log(movie.title)
我该怎么做?任何帮助将不胜感激。
【问题讨论】:
-
我假设您有一个渲染此文件的 Node.js 应用程序?如果是这样,您不能在渲染之前/之后简单地记录数据吗?
-
提交页面后如何记录数据?
标签: javascript mysql node.js express pug