struts2一个表单提交多个action

<from name="login" method="post" id="login">

<input type="button" value="登陆" onclick="login()">

<input type="button" value="注册" onclick="registor()">

</from>

function login()
 {
document.getElementById("login").action="<%=request.getContextPath()%>/loginForm/loginAction.action";
document.getElementById("login").submit();
 }
 function registor()
 {

document.getElementById("login").action="<%=request.getContextPath()%>/loginForm/registorAction.action";
document.getElementById("login").submit();
 }

你可能感兴趣的:(struts2一个表单提交多个action)