将外部HTML文件包含到另一个HTML文件中 [英] Including external HTML file to another HTML file

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

问题描述

如何将外部HTML文件插入到我的文件中?



例如:

 < div id =header> 

这里显示文件中的外部HTML代码,例如:name.html

< / div>



非常感谢! / p>

解决方案

另一种方法是使用object标签。这适用于Chrome,IE,Firefox,Safari和Opera。

 < object data =html / stuff_to_include.html> ; 
您的浏览器不支持对象标签。
< / object>

更多资讯于
http://www.w3schools.com/tags/tag_object.asp


How can I insert an external html file to my file?

For instance:

<div id="header">

       Here show the external HTML code in the file, for example: name.html

</div>

Thank you very much!

解决方案

Another way is to use the object tag. This works on Chrome, IE, Firefox, Safari and Opera.

<object data="html/stuff_to_include.html"> 
    Your browser doesn’t support the object tag. 
</object>

more info at http://www.w3schools.com/tags/tag_object.asp

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

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