jsp中的submit提交页面的同时跳转到指定那个页面

如题所述

提交和跳转同时进行,是不行的。。。
你可以在提交的那个页处理之后再跳转。。。效果是一样的。
比如SUBMIT那个页是A.jsp提交的页面是B 要跳转到的是C
你可以在A提交到B之后,由B跳转到C。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-12-11
比如jsp中有如下form,在提交的时候跳转到action指定的地址就可以了。

<form id="form1" name="form1"method="POST" action="new.jsp">
<input type="text" name="name">
<input type="text" name="psd">
<input type="submit" value="提交">
<input type="reset" value="重置">
</from>
<scripttype="text/javascript">
function submit() {
var fromObj = document.getElementById("form1")) {
fromObj.action="new.jsp";
fromObj.method="post";
fromObj.submit();
}
}
</script >
第2个回答  推荐于2018-02-27
struts1
有以下几种ACTION类型.
DispatchAction: 能同时完成多个Action 功能的Action 。
? ForwardActon: 该类用来整合Struts 和其他业务逻辑组件,
? IncludeAction: 用于引入其他的资源和页面。
? LookupDispatchAction: DispatchAction 的子类,
? MappingDispatchAction: DispatchAction 的子类
? SwitchAction: 用于从一个模块转换至另一个模块,如果应用分成多个模块时,
你的action继承法的是那个?是Action还是.DispatchAction ?本回答被网友采纳
第3个回答  2011-11-11
在提交的时候触发事件里面加入
window.document.location="../跳转页.jsp";
window.open=(../跳转页.jsp);
第4个回答  2011-10-27
在服务器段接收后,可以forward或redirect去你指定的页面
相似回答