//jquery代码一定要写在iframe下面
<iframe name="shopStep" id="shopStep" src="${ctxPath}/site/user/shopCart" style="overflow:visible;"
scrolling="no" frameborder="no" width="100%" onLoad="reinitIframeEND();"></iframe>
<script type="text/javascript">
$("#shopStep").load(function(){
var mainheight = $(this).contents().find("body").height()+30;
$(this).height(mainheight);
});
</script>
jquery实现iframe自适应子页面高度
最新推荐文章于 2022-02-21 16:38:13 发布