Delete unused downloads page asset.
[chromium-blink-merge.git] / third_party / jstemplate / tutorial_examples / 01-quick.html
blobdf8c7e5a5b24dcb47cc51fee1212d98e1baa9ac4
1 <html>
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">
7 var favdata = {
8 title: 'Favorite Things',
9 favs: ['raindrops', 'whiskers', 'mittens']
12 function showData(data) {
13 // This is the javascript code that processes the template:
14 var input = new JsEvalContext(data);
15 var output = document.getElementById('t1');
16 jstProcess(input, output);
18 </script>
19 </head>
20 <body onload="showData(favdata)">
22 <!--
23 This is the template:
24 -->
25 <div id="t1">
26 <h1 jscontent="title"></h1>
27 <ul><li jscontent="$this" jsselect="favs"></li></ul>
28 </div>
29 <p>
30 <a href="#" onclick="favdata.favs.push('packages');showData(favdata);">Reprocess</a>
31 </p>
32 </body>
33 </html>