tutorial pengembangan web terbaru
 

AppML HTML Termasuk


Dengan AppML, Anda dapat menyertakan HTML dalam HTML.


Termasuk HTML di HTML

Sebuah contoh yang baik dari ini, adalah untuk menyertakan footer HTML standar di semua halaman HTML Anda.

Ini adalah contoh dari file yang berisi footer standar:

inc_footer.htm

<hr style="margin-top:10px;">
<p style="font-size:11px">2015&copy; w3ii. All rights reserved.</p>
<hr>

Dalam contoh ini appml-include-html atribut digunakan untuk menyertakan file "inc_footer.htm" :

Contoh

<!DOCTYPE html>
<html lang="en-US">

<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="http://www.w3ii.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>
Cobalah sendiri "