如何在一个FORM中定义多个按钮,让每个按钮响应一种事件???
如果我的JSP程序中的一个Form中有5个按钮,要触发5个不同的事件,当点不同的按钮就触发相应的事件,怎么实现?
请各位高手指点。
我的代码如下:
<%@ page contentType="text/html;charset=gb2312"%>
<head>
<title>图形库管理</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
</head>
<body>
<div align="center"><p><font size="10" color="blue" face="隶书">图形库管理</font></p></div>
<form method="GET" action="txkgl.jsp">
<table width="322" border="1" cellspacing='2' cellpadding="20" align="center">
<tr valign="middle" align="center">
<td colspan="8" height="5"><font size="4">
<input type="submit" name="cmdadd" value="添加">
<input type="submit" name="cmdmodify" value="修改">
<input type="submit" name="cmddel" value="删除">
<input type="submit" name="cmdpreview" value="预览">
<input type="submit" name="cmdsearch" value="查询"></font>
</td>
</tr>
</table>
</form>
</body>
</html>