首页 » 99链接平台 » \u003cAppML\u003e 案例研究-HTML 模板(模板客户案例研究表单)

\u003cAppML\u003e 案例研究-HTML 模板(模板客户案例研究表单)

少女玫瑰心 2024-11-07 01:18:53 0

扫一扫用手机浏览

文章目录 [+]

添加 HTML 模板

我们将演示如何向 HTML 页面添加 HTML 模板。

列出客户

\u003cAppML\u003e 案例研究-HTML 模板(模板客户案例研究表单) 99链接平台
(图片来自网络侵删)

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=\"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=\"images/appmlFolder.png\"></td>

<td>#CustomerName#</td>

<td>#City#</td>

<td>#Country#</td>

</tr>

</table>

<script src=\"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=\"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>

尝试一下 »

现在把所有的合并在一起

最后,通过少量代码复制,我们就可以完成项目。

客户列表、表单和订单

<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=\"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>

标签:

相关文章

语言的世界之旅,分类法下的语言奥秘

在人类文明的浩瀚长河中,语言作为一种独特的交流工具,承载着人类思想、文化和情感的传递。语言学家们通过对语言的深入研究,将语言进行了...

99链接平台 2025-01-01 阅读2 评论0

跨语言视角下的“发财”文化现象介绍

“发财”一词,在各个语言中都有其独特的表达方式和内涵。从汉语到英语,从阿拉伯语到日语,发财文化在全球范围内都有着广泛的影响力。本文...

99链接平台 2025-01-01 阅读1 评论0

网络透传协议,构建高效信息传输的基石

随着信息技术的飞速发展,网络通信已经成为现代社会不可或缺的一部分。而在众多网络通信协议中,网络透传协议因其高效、稳定、安全的特点,...

99链接平台 2025-01-01 阅读1 评论0