The sub-page joins the AJAX Global approach:
<script language="javascript" type="text/javascript" > $ (document). Ready (function () {/// Asynchronous request loading complete $.ajaxsetup ({ 'complete': function () { // Modify IFRAME Height resizeparentiframe ( ) ;}); </script>
To modify the iframe height:
//Child page re-modifies the parent page iframe heightfunction Resizeparentiframe () {varRealheight =0; if(Navigator.userAgent.indexOf ("Firefox") >0|| Navigator.userAgent.indexOf ("Mozilla") >0|| Navigator.userAgent.indexOf ("Safari") >0|| Navigator.userAgent.indexOf ("Chrome") >0) {//Mozilla, Safari,chrome, ...Realheight = Window.document.documentElement.offsetHeight + *; } Else if(Navigator.userAgent.indexOf ("MSIE") >0) {//IE varBodyscrollheight = Window.document.body.scrollHeight + +;//get the body of the scrollheight varElementscrollheight = Window.document.documentElement.scrollHeight +1;//get the scrollheight of documentelementRealheight = Math.max (Bodyscrollheight, elementscrollheight);//take the bigger one.}Else{//Other BrowsersRealheight = window.document.body.scrollHeight + window.document.body.clientHeight +1; } if(Realheight < -) {Realheight= -; } if($("#ifm", window.parent.document). is("iframe")) { $("#ifm", window.parent.document). Height (realheight); }}
Reference: http://www.cnblogs.com/shenyixin/archive/2013/03/05/2943892.html
The child page re-modifies the parent page iframe height after the asynchronous operation is performed