<from name="login" method="post" id="login">
<input type="button" value="登陆" onclick="login()">
<input type="button" value="注册" onclick="registor()">
</from>
function login()<br>{<br>document.getElementById("login").action="<%=request.getContextPath()%>/loginForm/loginAction.action";<br>document.getElementById("login").submit();<br>}<br>function registor()<br>{
document.getElementById("login").action="<%=request.getContextPath()%>/loginForm/registorAction.action";<br>document.getElementById("login").submit();<br>}