如何在html 页面 include 其它页面

 我来答
维湾教育培训
推荐于2018-03-28 · 知道合伙人软件行家
维湾教育培训
知道合伙人软件行家
采纳数:3549 获赞数:13648

向TA提问 私信TA
展开全部
通过div嵌套iframe实现
<script type="text/javascript">
$(function () {
document.getElementById("ifm").src ="";//Url地址
$("#ifm").load(function () {
var h = document.body.clientHeight;
var w = document.body.clientWidth;
document.getElementById("ifm").height = h + "px";
document.getElementById("ifm").width = w + "px";

});
})
</script>
<body style="overflow-y:hidden;overflow-x:hidden">
<div id="pageone" style="">
<iframe name="ifm" id="ifm" scrolling="yes" style="background-color: transparent;" marginwidth="0" marginheight="0" frameborder="0">
</iframe>
</div>
</body>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
烟灰的末日889
2014-10-30 · TA获得超过493个赞
知道小有建树答主
回答量:197
采纳率:0%
帮助的人:179万
展开全部
被包含文件与父文件存在于相同目录中
<!-- #include file = "index.html" -->
被包含文件位于脚本虚拟目录中
<!-- #include virtual = "/scripts/tools/index.html" -->
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式