AppML を使用すると、HTML に HTMLをインクルードすることができます。
この良い例として、すべての HTML ページに標準の HTML フッターをインクルードすることです。
これは、標準のフッターを含むファイルの例です:
<hr style="margin-top:10px;">
<p style="font-size:11px">2015© W3Schools. All rights reserved.</p>
<hr>
この例の appml-include-html 属性は、ファイル "inc_footer.htm" をインクルードするために使用します:
<!DOCTYPE html>
<html lang="ja">
<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="http://www.w3schools.com/appml/2.0.3/appml.js"></script>
<body>
<h1>Customers</h1>
<table appml-data="customers.js">
<tr>
<th>Customer</th>
<th>City</th>
<th>Country</th>
</tr>
<tr appml-repeat="records">
<td>{{CustomerName}}</td>
<td>{{City}}</td>
<td>{{Country}}</td>
</tr>
</table>
<div appml-include-html="inc_footer.htm"></div>
</body>
</html>
Try It Yourself »