How to get the current input value which is entering on select 2 input field
问题 When i'm first time entering multi select values i got the current entered text value based on below code in jquery <select class="form-control select2" multiple="multiple" data-placeholder="Select areas" style="width: 100%;" id="edit_areas" name="area"> </select> $(".select2-search__field").val() $(document).on('keyup',".select2", function (e) { var city = $("#add_city option:selected").text(); var location = $(".select2-search__field").val();}); which works fine. But on edit when try to