我现在要使用jstl从数据库取值,值为int 型,defalut = 0 ,如果是0 redio1选中redio2不选中,
其他情况,redio2选中, redio1不选中, <c:if test="${message.status}==0">
<label>
<input name="message.status" type="radio" value="${message.status}"> 可用
</label>
</c:if>
<c:if test="${message.status}==50">
<label>
<input type="radio" name="message.status" value="${message.status}">不可用
</label>
</c:if>
这样写不出效果!帮我看看!
其他情况,redio2选中, redio1不选中, <c:if test="${message.status}==0">
<label>
<input name="message.status" type="radio" value="${message.status}"> 可用
</label>
</c:if>
<c:if test="${message.status}==50">
<label>
<input type="radio" name="message.status" value="${message.status}">不可用
</label>
</c:if>
这样写不出效果!帮我看看!
解决方案 »
- 怎样输出
- <form>表单
- 帮忙看看红色部分是做什么用
- 求救:org.springframework.dao.DataAccessResourceFailureException: Could not create Oracle LOB
- ========**** 请教使用struts 标签实现3行4列的问题 ********===============
- 又一个tomcat连sql server2000的问题
- hibernateTemplate好像不能删除主键不为Id的数据,求解决?
- 小弟刚开始从事WEB开发,是看书为主还是看论坛,请各位哥哥给点意见
- jsdk和jswdk的安装问题,请大家帮忙。
- 学习jsp之最低需求?????????,我要学jsp,不知道用什么,原来装着jdk,机子有www服务,不知道配置运行jsp后,会不会对原来的www产生什么不良影响?
- ibatis2.5的使用
- jsp页面的跳转问题 急~!~!
你这只是显示哪个radio
然后输出${message.status}==50 这个值看下.你加个lable 标签 啥用途? 去了吧
<label>
<input name="message.status" type="radio" value="${message.status}" checked > 可用
</label>
</c:if>
<c:if test="${message.status}==50">
<label>
<input type="radio" name="message.status" value="${message.status}" >不可用
</label>
</c:if>
怎么更新到数据库啊!使用struts2对象数据封装!谢谢大家!
<label>
<input name="message.status" type="radio" value="${message.status}"
<c:if test="${message.status==0}">checked</c:if>> 可用
</label>
<label>
<input type="radio" name="message.status" value="${message.status}"
<c:if test="${message.status!=0}">checked</c:if>>不可用
</label>
那要是从页面获取选中按钮的值怎么办!以对象方式做数据封装!使用的是struts2!有点类似于选择男,女这个的操作!
谢谢!
127.0.0.1 替换成 127.0.*.*
<label>
<input name="message.status" type="radio" value="${message.status}" checked> 可用
</label>
</c:if><c:if test="${message.status!=0}" >
<label>
<input name="message.status" type="radio" value="${message.status}" checked> 可用
</label>
</c:if>
radio必须有checked才能选中
<c:if test="${session.dbPerson.sex==1}">checked</c:if>>男
<input type="Radio" name="person.sex" value="2"
<c:if test="${session.dbPerson.sex==2}">checked</c:if>>女
上面的不好意思错了 这个参考一下