有问题代码:
<form action="dept_control.jsp" method="post">
<table align="center" width="30%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><B>部门编号:</B></td>
<td colspan="2"><input type="text" name="DepartmentNo"/></td>
</tr>
<tr align="center">
<td>
<input type="hidden" name="status" value="query"/>
<input type="submit" value="查询"/>
</td>
<td align="right">
<input type="hidden" name="status" value="insert"/>
<input type="submit" value="添加"/>
</td>
<td>
<input type="hidden" name="status" value="update"/>
<input type="submit" value="修改"/>
</td>
<td align="left">
<input type="hidden" name="status" value="delete"/>
<input type="submit" value="删除"/>
</td>
</tr>
</table>
</form>
修改之后:
<form action="dept_control.jsp" name="deptForm" method="post">
<table align="center" width="30%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><B>部门编号:</B></td>
<td colspan="2"><input type="text" name="DepartmentNo"/></td>
</tr>
<tr>
<td colspan="2"><B>部门名称:</B></td>
<td colspan="2"><input type="text" name="DepartmentName"/></td>
</tr>
<tr>
<td colspan="2"><B>部门负责人:</B></td>
<td colspan="2"><input type="text" name="Manager"/></td>
</tr>
<tr>
<td colspan="2"><B>部门地址:</B></td>
<td colspan="2"><input type="text" name="Address"/></td>
</tr>
<tr>
<td colspan="2"><B>部门电话:</B></td>
<td colspan="2"><input type="text" name="Telephone"/></td>
</tr>
<tr align="center">
<td>
<input type="submit" name="status" value="query"/>
</td>
<td align="right">
<input type="submit" name="status" value="insert"/>
</td>
<td>
<input type="submit" name="status" value="update"/>
</td>
<td align="left">
<input type="submit" name="status" value="delete"/>
</td>
</tr>
</table>
</form>
修改之后就可以了,这是什么原因?求大神们解答!