0

我在我的 xampp 上本地托管该站点,但是,此代码应该可以根据站点大小自动调整并查看它,但是在这里我无法调整它的大小,也无法查看它(我只是在iframe 空间)我做错了什么,如果有更简单的方法,请建议我。这是代码:

< SCRIPT LANGUAGE = javascript >

  function reSize() {
    try {
      var oBody = ifrm.document.body;
      var oFrame = document.all("ifrm");

      oFrame.style.height = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight);
      oFrame.style.width = oBody.scrollWidth + (oBody.offsetWidth - oBody.clientWidth);
    }
    //An error is raised if the IFrame domain != its container's domain
    catch (e) {
      window.status = 'Error: ' + e.number + '; ' + e.description;
    }
  }

< /SCRIPT>
                 
               
<BODY onload=reSize()>
	<iframe onresize=reSize() id=ifrm src="http:/ / www.twitter.com "></iframe>
</BODY>

4

0 回答 0