在主程序中用以下javascript

 

 function calcIFrameHeight(id) {
           
          //find the height of the internal page
          var theHeight=
            document.getElementById(id).contentWindow.
              document.body.scrollHeight;
 
          //change the height of the iframe
          document.getElementById(id).height =
              theHeight + 50;
        }

 

在iframe中用

if (this.frameElement != null) window.parent.calcIFrameHeight(this.frameElement.attributes.id.value);

 

 

相关文章:

  • 2021-12-12
  • 2021-11-16
  • 2021-06-17
猜你喜欢
  • 2022-12-23
  • 2021-12-12
  • 2021-09-12
  • 2021-11-22
  • 2021-12-12
相关资源
相似解决方案