页面:
<html:form>
<html:submit value="向前" οnclick="command.value = 'previous';" />
<html:submit value="向后" οnclick="command.value = 'next';" />
<html:submit value="确定" οnclick="command.value = 'ok';" />
</td>
</tr>
<INPUT TYPE="hidden" NAME="command">
</html:form>
在ACTION中:
String command = (String)request.getParameter("command");
if(command.equals("ok")) {
..........................
}else if (command.equals("previous")){
.........................
}else if(command.equals("next")){
.........................
}
ps: 只有在html:text后面追加上οnclick="command.value='sele';"才能在输入完信息后,通过按回车来成功提交
<td ><html:text property="sinseiNO" <!----- οnclick="command.value='sele';" -----> /></td>
<td ><html:submit value="確定" οnclick="command.value='sele';"/> </td>