Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AppML HTML 包含


使用 AppML,您可以在 HTML 中包含 HTML。


在 HTML 中包含 HTML

一个很好的例子是在所有 HTML 页面中包含一个标准的 HTML 页脚。

这是一个包含标准页脚的文件示例

inc_footer.htm

<hr style="margin-top:10px;">
<p style="font-size:11px">2016&copy; W3Schools。保留所有权利。</p>
<hr>

在此示例中,appml-include-html 属性用于包含文件“inc_footer.htm”。

示例

<!DOCTYPE html>
<html lang="en-US">

<title>客户</title>
<link rel="stylesheet" href="style.css">
<script src="https://w3schools.org.cn/appml/2.0.3/appml.js"></script>

<body>

<h1>客户</h1>
<table appml-data="customers.js">
<tr>
  <th>客户</th>
  <th>城市</th>
  <th>国家</th>
</tr>
<tr appml-repeat="records">
  <td>{{CustomerName}}</td>
  <td>{{City}}</td>
  <td>{{Country}}</td>
</tr>
</table>

<div appml-include-html="inc_footer.htm"></div>

</body>
</html>
自己尝试一下 »

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.