[Html] dynamically changes the height of the IFrame to achieve automatic IFrame stretching. The parent page is also automatically scaled down. Principle: When the IFrame subpage is loaded, the parent IFrame object is called, change its height: 1. Add JavaScript <script> function IFrameResize () {// alert(this.doc ument. body. scrollHeight); // The height var obj = parent.doc ument of the current page is displayed. getElementById ("childFrame"); // get the IFrame object of the parent page // alert (obj. height); // The height obj set in IFrame in the parent page is displayed. height = this.doc ument. body. scrollHeight; // adjust the IFrame height on the parent page to the height of this page} </script> 2. in the body of the IFrame page (that is, the Child page, add an onload event <body onload = "IFrameResize ()"> 3. Add an ID for the IFrame tag of the parent page, that is, the first step above, childFrame <IFRAME border = 0 marginWidth = 0 frameSpacing = 0 marginHeight = 0 src = "frame1.jsp" frameBorder = 0 noResize scrolling = "no" width = 2nd height = 100% vspale = "0" id = "childFrame"> </IFRAME>