iframe的宽度和高度自适应
$(function(){
$("调整的iframe").attr("width",(document.body.offsetWidth - 100) + "px");
$("调整的iframe").attr("height", getHeight() + "px");
});
function getHeight() {
var height = document.body.clientHeight - 100;
if (height < 550)
height = 600;
alert(height);
return height;
}
还没有评论,来说两句吧...