jQuery解决iframe高度自适应代码


复制代码 代码如下:

<script type="text/javascript">
<!--
$(
function()
{
//iframe高度随内容自动调整
$('.main').load(
function()
{
$(this).height($(this).contents().find("body").attr('scrollHeight'));
}
);
}
);
// -->
</script>

« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3