多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

中國最全IT社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2

appml教程

AppML 案例模板

閱讀 (2093)

<AppML> 案例研究 - HTML 模板


此案例研究演示了如何構(gòu)建一個完整的 <AppML> 互聯(lián)網(wǎng)應(yīng)用程序,具有針對數(shù)據(jù)庫中的若干表進行信息列舉、編輯和搜索的功能。


添加 HTML 模板

在本章中,我們將演示如何向 HTML 頁面添加 HTML 模板。


列出客戶

HTML - View

<h1>Customers</h1>

<div id="List01"></div><br>

<table id="Template01" class="appmltable" style="display:none">
<tr>
<th>Customer</th>
<th>City</th>
<th>Country</th>
</tr>
<tr id="appml_row">
<td>#CustomerName#</td>
<td>#City#</td>
<td>#Country#</td>
</tr>
</table>

<script src="/upload/help/appml.js"></script>
<script>
var customers
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
</script>

嘗試一下 ?


列出客戶和客戶表單

通過巧妙地使用模板,可以很容易添加 <AppML> 列表對象和 <AppML> 表單之間的鏈接:

HTML - View

<h1>Customers</h1>
<div id="Form01"></div><br>
<div id="List01"></div><br>

<table id="Template01" class="appmltable" style="width:100%;display:none">
<tr>
<th></th>
<th>Customer</th>
<th>City</th>
<th>Country</th>
</tr>
<tr id="appml_row">
<td style="cursor:pointer" onclick="openForm('#CustomerID#')">
<img src="/upload/help/images/appmlFolder.png"></td>
<td>#CustomerName#</td>
<td>#City#</td>
<td>#Country#</td>
</tr>
</table>

<script src="/upload/help/appml.js"></script>
<script>
var customers,customerForm;
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");

function openForm(id)
{
customerForm=new AppML("appml.php","Models/Customers");
customerForm.displayType="form";
customerForm.run("Form01","",id);
}
</script>

嘗試一下 ?


列出客戶和客戶訂單

通過巧妙地使用模板,可以很容易添加 <AppML> 列表對象和所鏈接的列表之間的鏈接:

HTML - View

<h1>Customers</h1>
<div id="List01"></div><br>
<div id="Orders01"></div><br>

<table id="Template01" class="appmltable" style="width:100%;display:none">
<tr>
<th>Customer</th>
<th>City</th>
<th>Country</th>
<th></th>
</tr>
<tr id="appml_row">
<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" style="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="/upload/help/appml.js"></script>
<script>
var customers,orders;
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
function openOrders(id)
{
orders=new AppML("appml.php","Models/Orders");
orders.setQuery("orders.customerid",id);
orders.commands=false;
orders.run("Orders01","Template02");
}
</script>

嘗試一下 ?


現(xiàn)在把所有的合并在一起

最后,通過少量代碼復(fù)制,我們就可以完成項目。

客戶列表、表單和訂單

<h1>Customers</h1>

<div id="List01">
<table id="appml_list" class="appmllist">
<tr>
<th>Customer</th>
<th>City</th>
<th>Country</th>
<th></th>
</tr>
<tr id="appml_row">
<td>#CustomerName#</td>
<td>#City#</td>
<td>#Country#</td>
<td><a href='' onclick='openOrders("#CustomerID#");return false;'>Orders</a></td>
</tr>
</table>
</div>

<div id="List02"></div>

<script src="/upload/help/appml.js"></script>
<script>
var Customers,Orders
Customers=new AppML("appml.php","Models/Customers");
Customers.run("List01");

function openOrders(id)
{
var Orders=new AppML("appml.php","Models/Orders");
Orders.setQuery("orders.customerid",id);
Orders.commands=false;
Orders.run("List02");
}
</script>

嘗試一下 ?

在接下來的章節(jié)中,您可以看到更多帶有完整源代碼的應(yīng)用程序。



關(guān)閉
程序員人生
主站蜘蛛池模板: 三级成人做爰视频 | 成年人免费网站视频 | 国产成人久久综合漫画 | 欧美区在线观看 | 樱花aⅴ一区二区三区四区 影视精品网站入口 | 黑人性xxx | 欧美一级片手机在线观看 | 在线偷拍自拍 | 国产精品免费一区二区三区 | 日本aaaa片毛片免费观看 | 色www永久免费 | 来吧成人综合网 | 中文在线1区二区六区 | 一级做a爰片久久毛片图片 一级做a爰片欧美aaaa | 一级毛片视频在线 | 看性过程三级视频在线观看 | 亚洲精品乱码久久久久久蜜桃欧美 | 欧美日韩国产一区二区三区欧 | 亚洲图区综合网 | 亚洲一区二区三区四区 | 国产a不卡片精品免费观看 国产a国产片色老头 | 99热久久久这里只有精品免费 | 亚洲欧美校园 | 大学生一级一片第一次免费 | 一区二区三 | 成人亲子乱子伦视频 | 国产午夜精品一区二区三区不卡 | 91精品国产高清久久久久 | 国产香蕉一区二区精品视频 | 国产免费a v吧在线观看不卡 | 97久久精品午夜一区二区 | 亚洲国产欧美在线成人aaaa | 久久日韩| 国产精品久久久久久麻豆一区 | 老司机免费福利在线观看 | 日本特级全黄一级毛片 | 国产成人亚洲综合91精品555 | 成人精品网 | 国产亚洲欧美久久精品 | 最近更新中文字幕在线 | 日韩欧美大片 |