求救一个iframe嵌入网页后的高度问题!
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script src="jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function (){ var iframe = document.getElementById("userArea"); 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) { } }); </script></head><body> <form id="form1" runat="server"> <div> <iframe id="userArea" name="userArea" frameborder="0" style="width:100%;" src="http://www.baidu.com" ></iframe> </div> </form></body></html>