iframe code, pay attention to write ID
jquery code one:
//Note: The following code is placed in test. html calls
$(window.parent.document).find("#main").load(function(){
var main = $(window.parent.document).find("#main") ;
var thisheight = $(document).height() 30;
main.height(thisheight);
});
jquery code two:
//Note: The following code is placed Call
$("#main").load(function(){
var mainheight = $(this).contents().find("body").height() 30;
$(this).height(mainheight);
});
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn