[摘要]本篇文章给大家带来的内容是关于json数据实现二级联动的实例代码,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。zaiqing_shenhe.jsp<head><l...
本篇文章给大家带来的内容是关于json数据实现二级联动的实例代码,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
zaiqing_shenhe.jsp
<head>
    <link href="static/bootstrap-3.3.5-dist/css/bootstrap.css" rel="stylesheet" />
    <link href="static/bootstrap-table/bootstrap-table.css" rel="stylesheet" />
    <link rel="stylesheet" href="static/bootstrap-select/bootstrap-select.min.css" />
</head>
<body>
    <div class="panel-body" style="padding-bottom:0px;">
        <div class="panel panel-default" style="margin:10px;">
            <div class="panel-heading">
                <span>查询条件</span>
            </div>
            <input id="query_dataSource" type="hidden"   value="${dataSource}">
            <input name="id"             type="hidden"   value="${id}">
            <div class="panel-body">
                                <!-- form表单 -->
                <form class="form-horizontal" id="formSearch">
                    <div class="form-group" style="margin:0px">
                        <!-- 一级选择框 -->
                        <div class="col-sm-2" style="width:110px;">
                            <label class="control-label" for="txt_search_departmentname">数据来源</label>
                            <select class="form-control" id="dataSource">
                                <option code="" value="" selected="selected">全部</option>
                                <c:forEach var="dataSource" items="${dataSources }">
                                    <c:choose>
                                        <c:when test="${obj.dataSources == dataSource.dataSourceName}">
                                            <option code="${dataSource.dataSourceCode}" value="${dataSource.dataSourceName }" selected="selected">${dataSource.dataSourceName}</option>
                                        </c:when>
                                        <c:otherwise>
                                            <option code="${dataSource.dataSourceCode}" value="${dataSource.dataSourceName }">${dataSource.dataSourceName}</option>
                                        </c:otherwise>
                                    </c:choose>
                                </c:forEach>
                            </select>
                        </div>
                        <!-- 二级选择框 -->
                        <div class="col-sm-2" style="width:110px;">
                            <label class="control-label" for="txt_search_departmentname">信息来源</label>
                            <select class="form-control" id="infoSource">
                              <option value="" selected="selected">全部</option>
                            </select>
                        </div>
                        <div class="col-sm-1" style="text-align:left;">
                            <button class="btn btn-primary" id="btn_query" type="button" style="margin-top:29px">查询</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <!-- 查询结果的列表显示位置 -->
        <div class=table-responsive">
            <table id="Table_queryList" class="table text-nowrap"></table>
        </div>
    </div>
    <script src="static/js/jquery-1.10.1.min.js"></script>
    <script src="static/bootstrap-3.3.5-dist/js/bootstrap.js"></script>
    <script src="static/bootstrap-table/bootstrap-table.js"></script>
        <script src="static/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
    <script src="static/bootstrap-select/bootstrap-select.js"></script>
    <script src="static/jsUtil/jquery.form.js"></script>
    <script src="static/js/zaiqing_shenhe.js"></script>
</body>