var t = $("#template").html(); console.log(t); // f是handlebars编译之后生成的函数 var f = Handlebars.compile(t); console.log(f); // 参数打他传入之后的HTML的字符串 var h = f(data); console.log(h);浏览器报错,Handlebars is not defined<script type="text/javascript" src="handlebars-v4.0.10.js"></script>
添加回答
举报
0/150
提交
取消