有没有一种方法可以包含HTML页面而不需要任何javascript或服务器端代码,只需要HTML

时间:2022-04-22 16:01:36

Is there a way of including HTML pages without needing any javascript or server-side code, only HTML.

有没有一种方法可以包含HTML页面而不需要任何javascript或服务器端代码,只需要HTML。

Basically I can't be sure if the server supports server side includes. I don't want to use javascript and I don't want to use any PHP or other server side functionality.

基本上我不能确定服务器是否支持服务器端包含。我不想使用javascript,我不想使用任何PHP或其他服务器端功能。

Is there any way to do this. At the moment I suspect not, but would be very interested if it were possible.

有没有办法做到这一点。目前我怀疑没有,但如果有可能会非常感兴趣。

3 个解决方案

#1


Use some frames in your page

在页面中使用一些框架

HTML frames allow authors to present documents in multiple views, which may be independent windows or subwindows.

HTML框架允许作者在多个视图中呈现文档,这些视图可以是独立的窗口或子窗口。

<iframe></iframe> is the tag you need to include inline floating frames.

Quick tip with iframes: Be sure you open and close the tag explicitly, if not some browsers will complain

使用iframe的快速提示:请确保明确打开和关闭标记,否则某些浏览器会抱怨

#2


You can use framesets.

您可以使用框架集。

#3


HTML imports, part of HTML Components, aims to do exactly this.

HTML导入是HTML组件的一部分,旨在实现这一目标。

HTML5rocks offers a great tutorial to get started with HTML imports.

HTML5rocks提供了一个很好的HTML入口入门教程。

According to can I use, only Chrome is supporting HTML imports today.

据我可以使用,目前只有Chrome支持HTML导入。

#1


Use some frames in your page

在页面中使用一些框架

HTML frames allow authors to present documents in multiple views, which may be independent windows or subwindows.

HTML框架允许作者在多个视图中呈现文档,这些视图可以是独立的窗口或子窗口。

<iframe></iframe> is the tag you need to include inline floating frames.

Quick tip with iframes: Be sure you open and close the tag explicitly, if not some browsers will complain

使用iframe的快速提示:请确保明确打开和关闭标记,否则某些浏览器会抱怨

#2


You can use framesets.

您可以使用框架集。

#3


HTML imports, part of HTML Components, aims to do exactly this.

HTML导入是HTML组件的一部分,旨在实现这一目标。

HTML5rocks offers a great tutorial to get started with HTML imports.

HTML5rocks提供了一个很好的HTML入口入门教程。

According to can I use, only Chrome is supporting HTML imports today.

据我可以使用,目前只有Chrome支持HTML导入。