首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

一个html框架跳转的有关问题

2012-08-17 
一个html框架跳转的问题一个框架HTML codeframeset cols20%,*frame srccardselect.htmlframe s

一个html框架跳转的问题
一个框架

HTML code
<frameset cols="20%,*">  <frame src="cardselect.html">  <frame src="selfcard.jsp" name="main"></frameset>

在cardselect.html中表单提交的一个servlet中,处理数据,使数据显示在selfcard.jsp中,只有selfcard.jsp页面刷新,其他页面不变,跳转代码该怎么写
我写的不行,会在cardselect.html中显示新的框架,但是刷新一下就正常了
Java code
response.sendRedirect("/card/custormermanage/customermanage.html");

card是项目名,custormermanage包名,customermanage.html框架的名称

[解决办法]
关键在于cardselect.html中提交请求的片段是怎么样的?

是否有用过某种手段指定目标窗口为“main”?
[解决办法]
cardselect.html:

<a href="xxx" target="main">在selfcard.jsp中刷新</a>
[解决办法]
response.sendRedirect("/card/custormermanage/customermanage.html");
换成js跳转
Java code
 out.print("<script type='text/javascript'>alert('对不起您必须先登录系统!');window.open ('"+request.getContextPath()+"/index.jsp','newwindow','');</script>");
[解决办法]
out.print("<script type='text/javascript'>parent.location.href='';</script>");

 
 

热点排行