<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<div id="tpl"></div>
<script type="text/javascript" src="http://twitter.github.io/hogan.js/builds/3.0.1/hogan-3.0.1.js"></script>
<script type="text/javascript">
var data = {name : "黄劲森"}
dom = document.getElementById("tpl"),
tpl = "<h1>hello,my name is {{name}}</h1>",
res = "";
tpl = Hogan.compile(tpl);
res = tpl.render(data);
dom.innerHTML = res;
</script>
</body>
</html>
感谢黄劲森小伙伴辅导我【2017-02-17,周五】!