<!DOCTYPE html>
<html lang="ja">
<head>
<title>jsRender</title>
<script src="//www.jsviews.com/download/jsrender.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="container"></div>
</body>
</html>
<div>
<h2>{{:title}}</h2>
<p>{{:body}}</p>
</div>
$(function(){
url:"template.html",
type:"GET",
dataType: 'html'
}).done(function(data) {
var tmpl = $.templates(data);
var html = tmpl.render(data);
$("#container").html(html);
});
});