Home > Web Front-end > JS Tutorial > How to implement adaptive height of iframe (embedded frame)_javascript skills

How to implement adaptive height of iframe (embedded frame)_javascript skills

WBOY
Release: 2016-05-16 19:27:31
Original
1013 people have browsed it

Several times I saw someone asking how to implement the adaptive height of iframe, which can automatically adapt with the length of the page to avoid the phenomenon of scroll bars appearing on the page and iframe at the same time. I happened to encounter a similar problem at work, so I went online. After searching and copying here and there, I came up with such a function, which can be used after pasting it into the page. I dare not keep it exclusive, if you find it useful, you are welcome to use

The source code is as follows

Copy the code The code is as follows:




When using it, just paste it in
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