例 如:
<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中应该怎么写
解决方案 »
- word文档转换成pdf 用java代码怎么实现?
- 急!struts2与spring整合的问题
- 请教,在jsp中iframe链接的页面的样式不起作用
- Expression stack.findValue(parameters.nodeTitleProperty) is undefined
- struts2 整合spring出错
- 菜鸟提问,关于EJB
- 没有办法了,哪位知道哪里能下MYSQL的JAVA驱动?在线等急.3X了!
- struts中如何从action中向页面传递数据?
- 一个很弱的问题:javaBean和EJB是不是一回事?
- help!有关SESSIONBEAN!
- 多层服务器的架设
- 使用s:action标签时出现的问题!但是只出现在某一部分,不知道怎么回事!!谁来帮解决下?谢谢啦
<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)){
...
}