Created
November 15, 2012 13:22
-
-
Save whoeverest/4078638 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="jquery-1.8.2.js"></script> | |
<script src="templating.js"></script> | |
<script type="text/html" id="packet_tmpl"> | |
<div> | |
<% for (var key in p) { %> | |
packet name <%=p[key]%> <br/> | |
<% } %> | |
</div> | |
</script> | |
<script type="text/javascript"> | |
packets = document.getElementById('packets'); | |
packets.innerHTML = tmpl("packet_tmpl", {p: {'pack1': '1', 'pack2': '2'}}) | |
</script> | |
</head> | |
<body> | |
<div id="packets"/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment