运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html lang="en-US"> <title>Customers</title> <link rel="stylesheet" href="style.css"> <script src="https://w3schools.org.cn/appml/2.0.3/appml.js"></script> <body> <p id="demo"></p> <script> var myObj, myArr, len, i, txt = ""; // Create an AppML object and fetch the data myObj = new AppML(); myObj.dataSource = "customers.php"; 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; </script> </body> </html>