页面a.php : <iframe id="a" name="a" src="b.php" scrolling="no" frameborder="5px" width="100%" height="100%"></iframe>
页面b.php: <iframe name="b" src="c.php" scrolling="no" frameborder="5px" width="100%" height="100"></iframe>
页面c.php 如何才能自适应高度
页面b 中没有ID属性啊
页面b.php: <iframe name="b" src="c.php" scrolling="no" frameborder="5px" width="100%" height="100"></iframe>
页面c.php 如何才能自适应高度
页面b 中没有ID属性啊
height: $(document).height() + 'px',
width: $(document).width() + 'px'
});
var thisWidth=$(document).width();
//iframe出了css的width还有width属性,因此把iframe的高度赋值给父级页面的iframe标签
top.$("iframe[name='b']").height(thisHeight).attr("height",thisHeight)
top.$("iframe[name='b']").width(thisWidth).attr("width",thisWidth);