How to get Selected Text from select2 when using <input>

前端 未结 9 1238
心在旅途
心在旅途 2020-12-12 23:38

I am using the select2 control, loading data via ajax. This requires the use of the tag.

Now, I want to retrieve the selecte

9条回答
  •  暖寄归人
    2020-12-13 00:14

    Also you can have the selected value using following code:

    alert("Selected option value is: "+$('#SelectelementId').select2("val"));
    

提交回复
热议问题