AppML API 定义了 AppML 的方法和属性
通过方法和属性,您可以:
新的AppML()创建一个新的 AppML 对象。
数据源设置AppML对象的数据源。
获取数据()获取数据。
数据记录包含数据记录。
您可以循环记录并在 HTML 元素中显示内容:
// Create an AppML object and fetch the data
myObj = new AppML();
myObj.dataSource = "https://www.91xjr.com/appml/customers.html";
myObj.getData();
// Locate the data records
myArr = myObj.data.records;
len = myArr.length;
// Display the records
for (i = 0; i < len; i++) {
txt += myArr[i].CustomerName + "<br>";
}
document.getElementById("demo").innerHTML = txt;
亲自试一试»
Alfreds Futterkiste
Berglunds snabbköp
Centro comercial Moctezuma
Ernst Handel
FISSA Fabrica Inter. Salchichas S.A.
Galería del gastrónomo
Island Trading
Königlich Essen
Laughing Bacchus Wine Cellars
Magazzini Alimentari Riuniti
North/South
Paris spécialités
Rattlesnake Canyon Grocery
Simons bistro
The Big Cheese
Vaffeljernet
Wolski Zajazd
Method | Description |
---|---|
new AppML() | Creates a new AppML object |
run() | Runs an application object |
appml("name") | Returns the appml object with the specified name |
displayMessage(text) | Displays a specified message. |
setError(no, description) | Sets a specified error and error description. |
Property | Description |
---|---|
appName | The application name (the container id) |
container | The application container element |
controller | The application controller |
data | The application data object |
dataSource | The application data source |
message | The application message |
Property | Description |
---|---|
data.model | The application data model |
data.records | The application data records |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!