根据iframe中的内容调整iframe高度

时间:2012-11-28 15:28:39

标签: javascript jquery html iframe expand

at default before expand when expanded 到目前为止,我的研究似乎没有帮助。我不是jquery sabbie,但它似乎不起作用。 iframe中有链接,一旦您点击每个链接,它就会展开并为您提供该链接的内容。那么iframe高度不会随之移动。这是我的代码。这是标题中的内容。

<script type="text/javascript">$(document).ready(function () {$('iframe').iframeAutoHeight({debug: true});});</script>

身体标签:

<iframe src="http://www.promero.com/defaultNewsTest.asp" class="auto-height"scrolling="no" frameborder="0"></iframe><script>$('iframe.auto-height').iframeAutoHeight({minHeight: 240});</script>

该网站为http://promerostage.promero.com/

1 个答案:

答案 0 :(得分:0)

看看下面的文章。我希望它会解决你的问题,因为它有解决方案,你寻求。

http://sonspring.com/journal/jquery-iframe-sizing