答案 0 :(得分:0)
您可以在函数
中传递this.value<select class="form-control" id="username" name="username" onchange="somerandonfunction(this.value)">
<option value="" selected>Select User</option>
@foreach($getUsers as $list)
<option value="{{$list->id}}" >{{$list->name}}</option>
@endforeach
</select>