• 下拉列表回选


    <select name="queryInfo.cityCode">
    <!--
    服务器端代码如:
    public class QueryInfo {
    private String cityCode;

    //cityCode的getter、setter
    public String getCityCode() {
    return cityCode;
    }
    public void setCityCode(String cityCode) {
    this.cityCode = cityCode;
    }
    }
    private QueryInfo queryInfo;

    //queryInfo的getter、setter
    public QueryInfo getQueryInfo() {
    return queryInfo;
    }
    public void setQueryInfo(QueryInfo queryInfo) {
    this.queryInfo = queryInfo;
    }
    -->
    <option value="0000" <c:if test="${queryInfo.cityCode=='0000' }">selected="selected"</c:if>>请选择地市</option>
    <option value="5910" <c:if test="${queryInfo.cityCode=='5910' }">selected="selected"</c:if>>福州</option>
    <option value="5920" <c:if test="${queryInfo.cityCode=='5920' }">selected="selected"</c:if>>厦门</option>
    <option value="5930" <c:if test="${queryInfo.cityCode=='5930' }">selected="selected"</c:if>>宁德</option>
    <option value="5940" <c:if test="${queryInfo.cityCode=='5940' }">selected="selected"</c:if>>莆田</option>
    <option value="5950" <c:if test="${queryInfo.cityCode=='5950' }">selected="selected"</c:if>>泉州</option>
    <option value="5960" <c:if test="${queryInfo.cityCode=='5960' }">selected="selected"</c:if>>漳州</option>
    <option value="5970" <c:if test="${queryInfo.cityCode=='5970' }">selected="selected"</c:if>>龙岩</option>
    <option value="5980" <c:if test="${queryInfo.cityCode=='5980' }">selected="selected"</c:if>>三明</option>
    <option value="5990" <c:if test="${queryInfo.cityCode=='5990' }">selected="selected"</c:if>>南平</option>
    </select>
  • 相关阅读:
    Java中的 多线程编程
    Python中的字典详解
    Python中的数据类型
    Python中的字符串操作总结(Python3.6.1版本)
    R语言绘制沈阳地铁线路图
    HIVE中的order by操作
    Hive中order by,sort by,distribute by,cluster by的区别
    HDFS shell命令
    HDFS入门
    Bootstrap_Datatable Ajax请求两次问题的解决
  • 原文地址:https://www.cnblogs.com/linjiqin/p/1995420.html
Copyright © 2020-2023  润新知