在页面中如何让iframe的高度自适应页面的高度
var iframeHeight = function(){
var _height = $(window).height(); //获取页面的高度,如果,页面中除了iframe,头部还有内容,那就在$(window).height()-50; 50代表头部内容的高度。
$('#id').height(_height);
}
window.onresize = iframeHeight;
$(function(){
iframeHeight()
})