如何在一个网页中引用另一个网页的html源代码

通过嵌套道iframe 实现嵌套html页面
<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="" marginwidth="0" marginheight="0" frameborder="0">
</iframe>
</div>
</body>

猜你喜欢

转载自www.cnblogs.com/aquariusunny/p/12729328.html