AppML Customers - 完整的應用程序
AppML> Customers - 完整的應用程序
??1 - 15 of 91??Filter
源代碼
HTML 源代碼
<html>
<body>
<h1>Customers</h1>
<div id="Form01"></div>
<div id="List01"></div><br>
<div id="Orders01"></div>
<table id="Template01" class="appmltable" stylex="width:100%;display:none">
<tr>
<th></th>
<th>Customer</th>
<th>City</th>
<th>Country</th>
<th>Orders</th>
</tr>
<tr id="appml_row">
<td stylex="cursor:pointer" onclick="customerForm.run("Form01","","#CustomerID#")">
<img src="Images/appmlPlus.png"></td>
<td>#CustomerName#</td>
<td>#City#</td>
<td>#Country#</td>
<td><a href="" onclick="openOrders(#CustomerID#);return false;">Orders</a></td>
</tr>
</table>
<table id="Template02" class="appmltable" stylex="width:100%;display:none">
<tr>
<th>Customer</th>
<th>Date</th>
<th>Salesperson</th>
<th>Shipper</th>
</tr>
<tr id="appml_row">
<td>#CustomerName#</td>
<td>#OrderDate#</td>
<td>#Salesperson#</td>
<td>#ShipperName#</td>
</tr>
</table>
<script src="appml.js"></script>
<script>
var customers,customerForm,orders;
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
customerForm=new AppML("appml.php","Models/Customers");
customerForm.displayType="form";
function openOrders(id)
{
orders=new AppML("appml.php","Models/Orders");
orders.commands=false;
orders.setQuery("orders.customerid",id);
orders.run("Orders01","Template02");
}
</script>
</body>
</html>
Customer | City | Country | Orders | |
---|---|---|---|---|
Alfreds Futterkiste | Berlin | Germany | Orders | |
Ana Trujillo Emparedados y helados | México D.F. | Mexico | Orders | |
Antonio Moreno Taquería | México D.F. | Mexico | Orders | |
Around the Horn | London | UK | Orders | |
B"s Beverages | London | UK | Orders | |
Berglunds snabbk?p | Lule? | Sweden | Orders | |
Blauer See Delikatessen | Mannheim | Germany | Orders | |
Blondel père et fils | Strasbourg | France | Orders | |
Bólido Comidas preparadas | Madrid | Spain | Orders | |
Bon app" | Marseille | France | Orders | |
Bottom-Dollar Marketse | Tsawassen | Canada | Orders | |
Cactus Comidas para llevar | Buenos Aires | Argentina | Orders | |
Centro comercial Moctezuma | México D.F. | Mexico | Orders | |
Chop-suey Chinese | Bern | Switzerland | Orders | |
Comércio Mineiro | S?o Paulo | Brazil | Orders |
TAG:程序員小新人學習 |