类似于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>
求解决!!!
<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>
求解决!!!
解决方案 »
- MyEclipse 连接tomcat 出现如下错误
- weblogic中的编码问题
- Javascript操作class
- 两个关于spring的问题。
- @_@! 我到底值多少钱???
- 求好心人,帮初学者看看这个HashMap为什么打印不出来呢
- hibernate关于多表查询的问题
- jax-ws方式创建的webservice, 怎么添加handler验证?
- 有谁能给我讲一下,<jsp:useBean>的class文件,是从哪个目录找的?
- 用ajax发送请求到servlet得到ajax2.xml内容,出错说找不到xml文件.
- POI将小数写入EXCEL,1.01变成1.00999999046325
- el表达式和JSP的问题,求指导。
赞同楼上的,你定一个div,js控制引入就好了
要是在不行
用一个table 在td中放一个frame
<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>