FrameName.document.body.offsetWidth;
FrameName.document.body.offsetHeight;

解决方案 »

  1.   

    <table>
    <tr>
          <td width="100%" height="345" colspan="2">
      <iframe id="test1" width=100 height=60 src="test62.htm"></iframe>
    </tr>
    </table>
    <input type=button value="read frame1 height" onclick="alert(test1.frames['frame1'].window.document.body.offsetHeight)">
    <input type=button value="read frame1 width" onclick="alert(test1.frames['frame1'].window.document.body.offsetWidth)">
      

  2.   

    <table>
    <tr>
          <td width="100%" height="345" colspan="2">
      <iframe id="test1" width=100 height=60 src="test62.htm"></iframe>
    </tr>
    </table>
    <input type=button value="read frame1 height" onclick="alert(test1.frames['frame1'].window.document.body.offsetHeight)">
    <input type=button value="read frame1 width" onclick="alert(test1.frames['frame1'].window.document.body.offsetWidth)">
      

  3.   

    你好!kingdomzhf(旭日东升) ,谢谢你的回答,但我试了一下你的方法,好像报找不到对象错误。