如何在HTML文件中导入HTML文件? [英] How can I import an HTML file within my HTML file?
问题描述
如何在HTML文件中导入HTML文件?我将分别准备header.html和footer.html文件以及我想要包含它们的每个文件我想将它们导入我的HTML文件。
How can I import an HTML file within my HTML file? I will prepare header.html and footer.html files separately and every file that I want to include them I want to import them into my HTML file.,
编辑:我看到基于SSI技术的解决方案。我使用Ubuntu和Tomcat 7.0.11。如何在tomcat上启用SSI?
I see that solution based on SSI technique. I use Ubuntu and Tomcat 7.0.11. How can I enable SSI at tomcat?
推荐答案
这个问题有很多解决方案。您可以编写简单的JavaScript代码以在加载时包含部分页面,您可以启用 SSI Web服务器,最后您可以使用任何服务器端语言动态包含任何页面的块以进行输出。您的选择取决于您的网站的动态程度。
There are many solutions to this problem. You can write simple JavaScript code to include parts of your page on load, you can enable SSI on your web-server, and finally you can use any server-side language to dynamically include chunks of any page for output. Your choice depends on how dynamic your web-site is.
这篇关于如何在HTML文件中导入HTML文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!