打开时调整iframe的大小 [英] Resize iframe when it is open

查看:116
本文介绍了打开时调整iframe的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

打开后如何根据科学事件调整iframe的高度??


我有一个锚定标签,单击锚定标签后,模式弹出窗口中的iframe应该重新调整大小.锚标记位于iframe本身中...


How to resize the iframe height on cient event when it is open???


I have a anchor tag,on clicking the anchor tag , the iframe in modal pop up should reszize. the anchor tag is in the iframe itself...


any suggestion is appreciated.

推荐答案

调整Modal弹出窗口高度(而不是iframe)的大小. iframe将自动
调整它.您可以通过iframe对象在客户端获取模式弹出对象,如下所示:

Resize your Modal popup Height instead of iframe. The iframe automatically will
adjust in it. You can get the modal pop up object at client side by the iframe object as

iframe1.contentWindow.document.getElementById('modalpopupid').style.height='100px';


请参阅以下有关StackOverflow的讨论:

> http://stackoverflow.com/questions/153152/resizing-an-iframe-based-内容上 [ ^ ]
See the following discussion on StackOverflow:

http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content[^]


这篇关于打开时调整iframe的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆