HTML是不允许FORM嵌套的,用一个简单的JAVASCRIPT就可以解决问题了
<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=text name=username> <input type=text name=password> <input type=button name=login value=LOGIN onclick="process('in')"> <input type=button name=logout value=LOGOUT onclick="process('out')">