首页
极刻
圈子
教程
开源
极客社区
写文章
发极刻
建圈子
发项目
登录 / 注册
返回教程:AppML 教程
TRY RUN / 在线示例
AppML 教程 尝试一下
AppML 教程 尝试一下
源代码
运行
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="appml.css"> </head> <body> <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("https://www.ancii.com/appml/appml","../appml/Models/Customers.xml"); customers.run("List01","Template01"); function openOrders(id) { orders=new AppML("https://www.ancii.com/appml/appml","Models/Orders"); orders.setQuery("orders.customerid",id); orders.commands=false; orders.run("Orders01","Template02"); } </script> </body> </html>
运行结果