执行serlvet后杀死窗口的问题:-) 其实servlet里面不作任何事情,也弹出这个窗口,我想有没有办法把respose转到a.jsp中? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 a.jsp代码:<html><title>试卷管理</title><body rightmargin="0" leftmargin="0" topmargin="0" scroll=no class=body><script LANGUAGE="javascript"><!--function add(){ window.showModalDialog("b.html","","dialogHeight:105px;dialogWidth:245px;center:yes;edge:raised;scroll:no;status:no;unadorned:yes;"); parent.location="a.html";}//--></script> <input type=button name=add value=add onclick=javascript:add()></body></html>b.jsp代码:<html><head><title>新增<%=showType%></title><link rel="STYLESHEET" type="text/css" href="../common/Css/Public.css"><script LANGUAGE="javascript"><!--function CloseWindow(){ window.close();}function Action(){ window.addinfo.submit(); window.close();}//--></script></head><body leftmargin="0" topmargin="0" rightmargin="0" class=body><form method="POST" name=addinfo action="questionsetoperator"><table width="100%"> <p align="right"><input type="button" value="确定" name="OK" onclick=javascript:Action()> <input type="button" value="取消" name="cancel" onclick=javascript:CloseWindow()></p> </td> </tr></table></form></body>这里questionsetoperator是指向servlet questionsetoperator你在servlet中dopost(){返回<script>Javascript:top.window.close();</script>到前台即可} 命令行 运行 java java.net.* 界面聊天程序.请大家帮帮助 如何实现键盘上的组合键功能? 新建一个Java群4780231,欢迎Java编程爱好者加入! 【续帖】我的帖子无法回复是怎么回事?原贴【STRUTS 线程共享冲突】actionform中的数据似被共享了! socket通讯中发送的消息包问题请教: 一个想学JAVA的人 求救:怎样用JDBC把文本数据导入到Oracle数据库中 使用JBuild开发计费网关 封装、继承、多态 求讲解 怎样配置jaxp? java能和mysql搭配么?
<html>
<title>试卷管理</title>
<body rightmargin="0" leftmargin="0" topmargin="0" scroll=no class=body>
<script LANGUAGE="javascript">
<!--
function add()
{
window.showModalDialog("b.html","","dialogHeight:105px;dialogWidth:245px;center:yes;edge:raised;scroll:no;status:no;unadorned:yes;");
parent.location="a.html";
}
//-->
</script>
<input type=button name=add value=add onclick=javascript:add()></body>
</html>
b.jsp代码:
<html>
<head>
<title>新增<%=showType%></title>
<link rel="STYLESHEET" type="text/css" href="../common/Css/Public.css">
<script LANGUAGE="javascript">
<!--
function CloseWindow(){
window.close();
}
function Action(){
window.addinfo.submit();
window.close();
}
//-->
</script>
</head><body leftmargin="0" topmargin="0" rightmargin="0" class=body>
<form method="POST" name=addinfo action="questionsetoperator">
<table width="100%">
<p align="right"><input type="button" value="确定" name="OK" onclick=javascript:Action()>
<input type="button" value="取消" name="cancel" onclick=javascript:CloseWindow()></p>
</td>
</tr>
</table>
</form>
</body>
这里questionsetoperator是指向servlet
返回
<script>Javascript:top.window.close();</script>
到前台即可
}