如何在没有frame / iframe的情况下将HTML页面包含到另一个HTML页面中? [英] How to include an HTML page into another HTML page without frame/iframe?

查看:128
本文介绍了如何在没有frame / iframe的情况下将HTML页面包含到另一个HTML页面中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HTML页面中包含一个HTML页面。可能吗?

I want to include an HTML page inside an HTML page. Is it possible?

我不想在PHP中执行此操作,我知道在PHP中,我们可以使用 include 这种情况下,如何在不使用 iframe frame 概念的情况下纯粹在HTML中实现同样的功能?

I don't want to do it in PHP, I know that in PHP, we can use include for this situation, how can I achieve the same purely in HTML without using the iframe and frame concept?

推荐答案

如果您只是想从另一个文件中粘贴自己的HTML,并且考虑 服务器端包含 为纯HTML(因为它看起来像一个HTML评论,并没有像PHP那样使用脏的东西):

If you're just trying to stick in your own HTML from another file, and you consider a Server Side Include to be "pure HTML" (because it kind of looks like an HTML comment and isn't using something "dirty" like PHP):

<!--#include virtual="/footer.html" -->

这篇关于如何在没有frame / iframe的情况下将HTML页面包含到另一个HTML页面中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆