You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
394 B
30 lines
394 B
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>print-demo</title>
|
|
<script src="../../dist/template-native.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>print</h1>
|
|
<script id="test" type="text/html">
|
|
<% print(a, b, c) %>
|
|
|
|
</script>
|
|
|
|
<script>
|
|
var html = '';
|
|
|
|
|
|
var data = {
|
|
a: 'hello',
|
|
b: '--world',
|
|
c: '--!!!'
|
|
};
|
|
|
|
html = template('test', data);
|
|
document.write(html);
|
|
</script>
|
|
</body>
|
|
</html> |