Home > Web Front-end > CSS Tutorial > Iframe adaptive highly compatible with ie, firefox multi-browser_Experience exchange

Iframe adaptive highly compatible with ie, firefox multi-browser_Experience exchange

WBOY
Release: 2016-05-16 12:06:09
Original
1934 people have browsed it
Copy Code The code is as follows:

<script> <BR> function SetCwinHeight(){ <BR>  var bobo=document.getElementById("bobo"); //iframe id <BR>  if (document.getElementById){ <BR>   if (bobo && !window.opera){ <BR>    if (bobo.contentDocument && bobo.contentDocument.body.offsetHeight){ <BR>     bobo.height = bobo.contentDocument.body.offsetHeight; <BR>    }else if(bobo.Document && bobo.Document.body.scrollHeight){ <BR>     bobo.height = bobo.Document.body.scrollHeight; <BR>    } <BR>   } <BR>  } <BR> } <BR></script>



[Ctrl A Select all Note:If you need to introduce external Js, you need to refresh it to execute]
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template