简体   繁体   中英

Changing the height of iframe according to the content in it?

I have a popup div in which I have an iframe. Initially, I have set the height of iframe to some px according to the content in it.

Now, I have a click event on the iframe from which I am redirecting to another view but this view has more content to fit the height. So I want to change the height of the iframe on that event or on the load of other view but I am unable to access the iframe from within that click event of a button.

EasyXDM provides a bunch of useful functions in order to manipulate communication between the client and fetched iframes

Here is an example similar with what you want to achieve. Keep in mind that you should also control the content into the iframe as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM