<input type="text" name="integer" value="0"/>
<input type="submit" value="add one" />
<%
String integer = request.getParameter("integer");
%>
<%
int x = 0;
try { x = Integer.parseInt("integer"); }
catch (Exception e) { x = 0; }
%>
每次点击提交按钮时,如何将整数加一?