在showModalDialog 窗口里实现分页

因业务需要,在模式对话框里也要实现分页,网上搜到有两个技巧:

1.   if   you   are   using   IE5.5   or   6,   try   to   add   this   line   to   your   code   
    <base   target="_self">   
2.   or   use   a   frameset   or   IFRAME     to   house   your   test.jsp

 

 

第一点,我试了,貌似不行,还有IE版本限制,我就放弃了,如果有网友知道的顺便跟小弟说一下,呵呵。

 

我是按第二点做的:

showModalDialog('test_frame.jsp',"")  
  在'test_frame.jsp'里面加上

<frameset><frame src="<%= linkto %>" name="ifm" scrolling=no noresize></frameset>  
  在你的分页JS方法中加上window.location.href="你要转到的页面或ACTION",就可以了。

 

<%@ page language="java" pageEncoding="GB2312"%>
<%
	//该页面是用来模式对话框分页
	String linkto = request.getParameter("linkto");
	linkto=linkto.replace("|", "&");//这里是防止&参数过来时得不到值
	String title=request.getParameter("title");
	title=new String(title.getBytes("ISO-8859-1"),"gbk");
%>
<html>
<head>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<title><%= title %></title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/include/css/style.css" type="text/css">
</head>
<frameset rows="100" frameborder=no border="0" framespacing="0">
  <frame src="<%= linkto %>" name="ifm" scrolling=no noresize>
</frameset><noframes>
<body>
</body>
</noframes>

</html>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值