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