jquery is very powerful and the code is very simple:
$("# iPersonalInfo").load(function() {
$(this).height($(this).contents().height());
})
A little It should be noted that I only discovered this during debugging, which wasted a lot of time. That is, the binding event must be bound before the iframe is loaded, otherwise it will not be executed.
The following is an overview of jQuery, load event
Bind a handler function to the load event of each matching element.
If bound to the window object, it will be triggered after all content is loaded, including windows, frames, objects and images. If bound to an element, it fires when the element's content is loaded.
Note: Only if the load processing function is bound before this element is completely loaded, it will be triggered after it is loaded. If you bind it later, it will never trigger. So don't bind the load event in $(document).ready(), because jQuery will bind the load event after all DOM loading is completed.