如何将html文件包含到另一个html文件中 [英] how to include a html file into another html file

查看:69
本文介绍了如何将html文件包含到另一个html文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将html文件包含到另一个html文件中

how to include a html file into another html file

推荐答案

简单的方法是使用 SSI [ ^ 你可以把任何文件说 mypage2.html 包含在多个启用SSI的页面中,通过放置代码来打败网站:



The easy way to do by is using SSI[^].You can include any file say mypage2.html into multiple SSI-enabled pages throgh out the website by placing the code:

<!–#include virtual-"../mypage2.html"–>





希望有所帮助:)



hope it helps :)


使用frameset的概念我们可以将多个html页面插入一个html页面。



看到这个..

By using the concept of frameset we can insert mulitple html pages into one html page.

See this..
<frameset cols="25%,75%">
    <frame src="frame_a.htm" />
    <frame src="frame_b.htm" />
</frameset>











or

<frameset rows="25%,*,25%">
  <frame src="frame_a.htm" />
  <frame src="frame_b.htm" />
  <frame src="frame_c.htm" />
</frameset>









这里,frame_a和frmae_b是两个html页面中使用frameset标签的页面。

希望这会很有用。





Here,frame_a and frmae_b are two html pages in the page where frameset tag is used.
Hope this will be useful.


你可以使用iframe标签。

ex 。

you can use iframe tag.
ex.
<!DOCTYPE html>
<html>
<body>

<iframe src="http://www.google.com"></iframe>
<p>Who are You???<p>
</body>
</html>





ref。

http://www.w3schools.com/html5/tag_iframe.asp [ ^ ]


这篇关于如何将html文件包含到另一个html文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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