appml-include-html, appml-controller (ok)
https://www.w3schools.com/appml/appml_controllers.asp

C:\xampp\htdocs\abc\index.html
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Customers</title>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="stylesheet" href="style.css">
<script src="http://localhost/library/appml/appml.js"></script>
</head>
<body>
<h1>Customers</h1>
<div appml-data="customers.js" appml-controller="myController">
<table>
<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>
<div appml-include-html="inc_footer.html"></div>
<script type="text/javascript">
function myController($appml) {
if ($appml.message == "display") {
if ($appml.display.name == "CustomerName") {
$appml.display.value = $appml.display.value.toUpperCase();
}
}
}
</script>
</body>
</html>C:\xampp\htdocs\abc\inc_footer.html
C:\xampp\htdocs\abc\style.css
C:\xampp\htdocs\abc\customers.js
Last updated
Was this helpful?