| <head><title>Jstemplates: Quick example</title> |
| <script src="../util.js" type="text/javascript"></script> |
| <script src="../jsevalcontext.js" type="text/javascript"></script> |
| <script src="../jstemplate.js" type="text/javascript"></script> |
| <script type="text/javascript"> |
| var tplData = "Joe User"; |
| // This is the javascript code that processes the template: |
| var input = new JsEvalContext(tplData); |
| var output = document.getElementById('tpl'); |
| jstProcess(input, output); |
| <body onload="showData()"> |
| Welcome <span jscontent="$this"> |
| (This placeholder name will be replaced by the actual username.) |