解决方法:改嵌套为并列,动态选择Action
代码示例
<script language=javascript>
function process(v){
if(v=="in"){
document.theForm.action="in.jsp";
}else{
document.theForm.action="out.jsp";
}
document.theForm.submit();
}
</script>
<form name=theForm method="post">
<input type=button onclick="process('in')">
<input type=button onclick="process('out')">
<form>