状况一:
<input name="from3" type="submit" class="sure" value="删除" οnclick="Vol_delete(${id})"/>
里面的type="submit"改成type="button"
状况二:
jsp中返回的值的类型不符合action中的类型
volEdit.jsp:
<tr>
<th>序号</th>
<th><input name="volunteer.id" type="text" class="dfinput" value="${volunteer.id}" style="width:518px;"/></th>
</tr>
<tr>
<th>手机号</th>
<th><input name="volunteer.volid" type="text" class="dfinput" value="${volunteer.volid}" style="width:518px;"/></th>
</tr>
其中value=" ${volunteer.id}",在
${volunteer.id}前面
有空格,int+空格=String
action:
public String update() {
volService.update(volunteer);
return "all";
}
在action中类型为"volunteer",所以不符合
改了之后就可以了