我有 2 个 HTML 文件,假设 one.html 和 two.html。在 one.html 中我想包含 two.html。
在 JSF 中,我可以这样做:
这意味着在 one.xhtml 文件中,我可以包含 two.xhtml。
我们如何在 *.html 文件中做到这一点?在百里香叶
在 one.html 中,您可以按照以下步骤包含two.html:
通过在 one.html 中添加以下行,将 two.html 包含在 one.html 中:
<div th:insert="two :: two"></div>
在two.html 中的标签后面添加这段代码<body>:
<div th:fragment="two">
<div th:fragment="two">这应该包括由into one.html提交的代码位
百里香文档中的更多信息