js获取页面内iframe的高度

function SetCwinHeight(f){
	var iframe=$G(f);
	try{
		var bHeight = iframe.contentWindow.document.body.scrollHeight;
		var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bHeight, dHeight);
		iframe.height = height;
	}catch (ex){}
	$G(f).contentWindow.nameIncreasing();
}

你可能感兴趣的:(JS)