How to implement iframe (embedded frame) adaptive height _ javascript skills

Source: Internet
Author: User
How to realize the adaptive height of iframe (embedded frame) several times I was asked how to implement the adaptive height of iframe, I was able to automatically adapt with the length of the page to avoid having a scroll bar in addition to the page and iframe at the same time. I also encountered a similar problem at work, so I went online to review it, and I went to the east to copy the West, after such a function is created, it can be attached to the page. Not exclusive. if you find it useful, please use it.

The source code is as follows:

The code is as follows:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.