现在的位置: 首页 > 综合 > 正文

struts2一个表单提交多个action

2013年10月10日 ⁄ 综合 ⁄ 共 476字 ⁄ 字号 评论关闭

<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();
 }

抱歉!评论已关闭.