据b.htm的大小动态的改变iframe的大小,在b.htm中
法1.
function changeIframeHeight()  //自动改变 Iframe 的高度
{
   if(top != self)
   {
      window.parent.document.getElementById(self.name).height = document.body.scrollHeight;
   } 
}
function window.onload()
{
   changeIframeHeight(); //改变 Iframe 高
}
法2.
<script language="javascript">
<!--
function toppage()
{
if (self.location!=top.location)
{
parent.document.all(self.name).height=document.body.scrollHeight + 30;
parent.document.all(self.name).width=document.body.scrollWidth + 30;
}
}
-->
</script>
<body onload="toppage()">