CNode

jquery.html(content)方法中,“content"中能否嵌入ejs的 “<% include component.ejs %>”标签?

问答
Hhcyhehe发布于9 年前最后回复9 年前2 回复3982 浏览0 收藏

jquery.html(content)方法中,“content"中能否嵌入ejs的 “<% include component.ejs %>”标签? 出来的结果是 “<% include component.ejs %>”这段在html页面变成了字符串,这个要怎么破 各位仁兄,各位大神,求救啊

查看回复

回复 (2)

G
godghdai#1·9 年前
jquery.html(new EJS({url: '/component.ejs'}).render(data)) 
H
hcyhehe#2·9 年前
引用 godghdai

@godghdai Uncaught TypeError: ejs is not a function 返回这个错误,请问这个怎么破?能详细一些吗,谢谢啦~

参与回复
登录后即可参与回复。登录