2 <head><title>Jstemplates: Quick example</title>
3 <script src="../util.js" type="text/javascript"></script>
4 <script src="../jsevalcontext.js" type="text/javascript"></script>
5 <script src="../jstemplate.js" type="text/javascript"></script>
6 <script type="text/javascript">
8 var tplData = {username:"Jane User",
10 {location:"111 8th Av.", label:"NYC front door"},
11 {location:"76 9th Av.", label:"NYC back door"},
12 {location:"Mountain View", label:"Mothership"}
17 // This is the javascript code that processes the template:
18 var input = new JsEvalContext(tplData);
19 var output = document.getElementById('tpl');
20 jstProcess(input, output);
24 <body onload="showData()">
32 <span jsselect="username" jscontent="$this">User de Fault</span>'s
35 <table cellpadding="5">
36 <tr><td><h2>Location:</h2></td><td><h2>Label:</h2></td></tr>
37 <tr jsselect="addresses"><td jscontent="location"></td><td jscontent="label"></td></tr>