数据回显
来源:互联网 发布:尼泊尔淘宝 编辑:程序博客网 时间:2024/05/18 13:45
一、c标签
if…else…
<c:choose> <c:when test="${shopProduct == ''}"> <input type="hidden" class="form-control" name="productid" value=""> </c:when> <c:otherwise> <input type="hidden" class="form-control" name="productid" value="${shopProduct.productid }"> </c:otherwise> </c:choose>
select
<select id="cateid" name="cateid" class="form-control" style="width:205px"> <option value="">---请选择---</option> <c:forEach items="${shopCategoryList}" var="shopCategoryList" varStatus="row"> <c:choose> <c:when test="${shopCategoryList.cateid eq shopProduct.cateid}"> <option value="${shopCategoryList.cateid}" selected="selected">${shopCategoryList.title }</option> </c:when> <c:otherwise> <option value="${shopCategoryList.cateid}">${shopCategoryList.title}</option> </c:otherwise> </c:choose> </c:forEach> </select>
radio
<c:if test="${shopProduct.issale=='1'}"> <input checked="checked" type="radio" class="form-control" name="issale" id="issale1" value="1"> <label for="issale1" style="display: inline;">是</label> <input type="radio" class="form-control" name="issale" id="issale0" value="0"> <label for="issale0" style="display: inline;">否</label> </c:if> <c:if test="${shopProduct.issale=='0'}"> <input type="radio" class="form-control" name="issale" id="issale1" value="1"> <label for="issale1" style="display: inline;">是</label> <input checked="checked" type="radio" class="form-control" name="issale" id="issale0" value="0"> <label for="issale0" style="display: inline;">否</label> </c:if>
使用以下方式,需要注意数据库存储的类型不要是char,enum
<input type="radio" name="emp.sex" value="1" <c:if test="${info.sex=='1'}" 'checked'/>/>男<input type="radio" name="emp.sex" value="1" <c:if test="${info.sex==0}" 'checked'/>/>女
全CSDN的丰(好)色(se)博客,这里有书本看不到的Java技术,电影院禁播的电影,欢迎关注QQ群494808400
0 0
- Fragment数据传递与数据回显
- Fragment数据传递与数据回显
- Fragment数据传递与数据回显
- iocpdemo,数据回显
- liferay_MVCPortlet数据回显
- EditText数据回显
- SpringMVC_数据回显
- 值栈、数据回显
- 数据回显
- Springmvc---数据回显
- 数据回显
- Struts数据回显
- 数据回显
- SpringMVC数据回显
- ssm:数据回显
- 数据回显
- 【Struts】数据回显
- html数据回显
- c++可变参数模板
- VS编译问题
- 从百度统计看到的一些有意思的事情
- 类的模板
- 畅通工程 并查集
- 数据回显
- GeoHash核心原理解析
- gettid和pthread_self区别
- struct elevator_queue
- 一个今天遇到的vs编译器怪现象
- HINSTANCE和HWND的区别
- "finally block does not complete normally"警告解决
- 常用TCP端口表
- Win2003下IIS以FastCGI模式运行PHP