类似于iframe的作用,但由于打开的的JSP页面是动态的,height值不好设定,且要对主页面添加打印功能,iframe不能实现。
<Iframe src="../print/hydljg_hb.jsp?dwid=14406&sj=201105" width="100%" height="150%" scrolling="no" marginwidth="0" 
marginheight="0"  hspace=0 align="middle" name="main" frameborder="0" ></iframe>
<Iframe src="../print/hydljg_tb.jsp?dwid=14406&sj=201105" width="100%" height="150%" scrolling="no" marginwidth="0" 
marginheight="0"  hspace=0 align="middle" name="main" frameborder="0" ></iframe>
<Iframe src="../print/hydljg_lb.jsp?dwid=14406&sj=201105" width="100%" height="150%" scrolling="no" marginwidth="0" 
marginheight="0"  hspace=0 align="middle" name="main" frameborder="0" ></iframe>
求解决!!!

解决方案 »

  1.   


    赞同楼上的,你定一个div,js控制引入就好了
      

  2.   

    赞同他们所的 
    要是在不行 
    用一个table  在td中放一个frame
      

  3.   

    <table><tr><td>
    <iframe id="iframe_content" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"  height="100%"
    width="<%=iframeWidth.parseInt() %>" 
    src="<%=theViewData.getColumnValue("detailContentUrl")%><%=urlParameter.toString()%>" onload="Javascript:SetCwinHeight()">
    </iframe>

    <script type="text/javascript">
     function SetCwinHeight(){
      var iframeid=document.getElementById("iframe_content"); //iframe id
      if (document.getElementById){
       if (iframeid && !window.opera){
        if (iframeid.contentDocument && iframeid.contentDocument.body.offsetHeight){
         iframeid.height = iframeid.contentDocument.body.offsetHeight;
        }else if(iframeid.Document && iframeid.Document.body.scrollHeight){
         iframeid.height = iframeid.Document.body.scrollHeight;
        }
       }
      }
     }
    </script>
    </table>
      

  4.   

    谢谢abstruct,podongxi777442156445,对我很有帮助。xiaol_zhong的方法没试··太长了····:)