1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
- <script type="text/javascript" src="../build/jsMotif.js"></script>
-
- <title>jsMotif example</title>
- </head>
- <body>
- <div id="template">
- <ul each="{books}">
- <li>
- <label>title: </label><strong fill="{title}"></strong><br>
- <label>author: </label><span fill="{author}"></span>
- </li>
- </ul>
- </div>
- <script type="text/javascript">
- var books = {
- books: [
- {
- title: 'Earthquake',
- author: 'Ian Rohr'
- },
- {
- title: 'Woody Allen',
- author: 'Eric Lax'
- },
- {
- title: 'Rick Santorum',
- author: 'Rick Santorum'
- },
- {
- title: 'Memorial Day',
- author: 'Vince Flynn'
- },
- {
- title: 'Earthquake',
- author: 'Greg Roza'
- }
- ]
- };
-
- var tpl = new jsMotif.Template({
- template: 'template',
- targetNode: 'template'
- });
-
- tpl.render(books);
-
-
- </script>
-
- </body>
- </html>
|