我想根据另一个下拉列表过滤一个下拉列表

时间:2018-03-28 07:13:21

标签: javascript jquery ajax laravel-5

我一方有部门,另一方有员工。我想根据部门的选择过滤员工。我对javascipt或ajax并不擅长。

            <div class="pure-checkbox ml-15">
               <input id="checkbox2" name="stars" type="radio" data-type="round" class="checkbox look-me" value="2">
               <label for="checkbox2"> Department </label>
            </div>
            <div id="show-me-three">
               <select class="form-control e1">
                   <option>Select</option>
               @foreach($department as $departments)
                       <option>{{ $departments->Name }}</option>
                   @endforeach
               </select>

            <div class="pure-checkbox ml-15 asset-employee-checkbox">
               <input id="checkbox6" name="stars" type="checkbox" data-type="round" class="checkbox" value="6">
               <label for="checkbox6">Employee</label>
            </div>
            <div class="asset-employee-list-show">
               <select class="form-control e1" name="ename">
                   <option>Select</option>
                       @foreach($all as $alls)
                           <option>{{ $alls->username }}</option>
                       @endforeach
               </select>
            </div>
            </div>

1 个答案:

答案 0 :(得分:0)

this.contentList.nativeElement.scrollTo({left: 0 , top: this.contentList.nativeElement.scrollHeight, behavior: 'smooth'});
相关问题