如何让frameset转跳 一个frameset,点击退出后,运行一个SERVLET,让整个frameset全部转跳,怎么实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 执行servlet的操作后,输出一段javascript来跳转<script language="javascript">window.parent.location.href = "URL";</script> 恩,也可以直接top.location.href="URL";这样就会全部跳了 请问能不能用servlet控制.....不是用页面来控制...... servlet控制的办法就是在Response里面输出那段javascript的流。 我本机没有java的开发环境 :( 大概就是这样写 ServletOutputStream out=null; DataInputStream in=null; FileOutputStream fileOut=null; try { response.setContentType("text/plain"); out = response.getOutputStream(); out.println("<script language=\"javascript\"> window.parent.location.href = \"URL\"; </script> "); out.close(); } catch (IOException e) { System.out.println("Error: " + e); } 页面这样window.parent.location.href = "myServlet.do"就能在servlet之后实现全部爷面跳转;要么就在servlet 里这样:out.println(" <script language=\"javascript\"> window.parent.location.href = \"URL\"; </script> "); 弹出对话框showModalDialog提交到一个ACTION,如何再提交到弹出前页面框架中? 存储过程的修改怎么写 请问关于blog的问题 spring security +cas 单点登录 注销session问题 java读mysql的longtext字段时出错!? JAVA连结各种数据库系统的驱动程序? 统计贴--来WEB版的朋友经常讨论大数据量下并发,经常回贴负载均衡的办法,到底有多少人做过负载均衡?? 如何把服务器端word数据载入到客户端,在客户端编辑后保存回服务器端 关于创建连接数据库参数问题? JAVA里又没有像C++里一样功能的析构函数? jdk1.6錯誤 文件上传问题
<script language="javascript">
window.parent.location.href = "URL";
</script>
也可以直接top.location.href="URL";
这样就会全部跳了
DataInputStream in=null;
FileOutputStream fileOut=null;
try
{
response.setContentType("text/plain");
out = response.getOutputStream();
out.println("<script language=\"javascript\">
window.parent.location.href = \"URL\";
</script> ");
out.close(); }
catch (IOException e)
{
System.out.println("Error: " + e);
}
就能在servlet之后实现全部爷面跳转;
要么就在servlet 里这样:
out.println(" <script language=\"javascript\">
window.parent.location.href = \"URL\";
</script> ");