<iframe ></iframe>

<a href="aboutUs.html" ; target="iframepage" >医院介绍</a></li>
<a href="newsList.html" ; target="iframepage" >新闻动态</a></li>

  其中name  和  tatget   必须保持一样。

  js中获取iframe中页面的高度

<script type="text/javascript">

function iFrameHeight() {
var ifm = document.getElementById("iframepage");
var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;      // IE和其他浏览器兼容选择
if (ifm != null && subWeb != null) {
ifm.height = subWeb.body.offsetHeight;              //offsetHeight 页面高度
}

}
</script>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-02-07
  • 2021-12-12
  • 2021-12-12
  • 2021-11-16
猜你喜欢
  • 2022-01-22
  • 2021-07-11
  • 2022-12-23
  • 2021-06-08
  • 2021-12-10
  • 2021-12-07
  • 2021-10-12
相关资源
相似解决方案