例 如:
<input type="radio" name="0" checked="checked" />病人
<input type="radio" name="1" />医生
<input type="radio" name="2" />管理员<br><br/>
<input type="submit" value="提交 ">
现在我想根据所选中的不同单选按钮,当点击“提交”后,跳转到不同的页面。
我在Servlet中应该怎么写
<input type="radio" name="0" checked="checked" />病人
<input type="radio" name="1" />医生
<input type="radio" name="2" />管理员<br><br/>
<input type="submit" value="提交 ">
现在我想根据所选中的不同单选按钮,当点击“提交”后,跳转到不同的页面。
我在Servlet中应该怎么写
<input type="radio" name="ButtonRadio" value="1" />医生
<input type="radio" name="ButtonRadio" value="2" />管理员<br/><br/>我是想在jsp 的Servlet中写一个判断,但不知道 If 中的条件应该怎么写
if("0".equals(str)){
request.getRequestDispatcher("").forward(request,response);
}
else if("1".equals(str)){
...
}
else if("2".equals(str)){
...
}