jQuery combobox/autocomplete but editable

前端 未结 4 812
野趣味
野趣味 2021-02-11 00:50

I\'m using the jQuery Autocomplete but I need it to be editable. What I mean is that if a value isn\'t in the list, I need to capture the value they entered. Using the example

4条回答
  •  你的背包
    2021-02-11 01:17

    Using the cleaner solution from darkajax, and the following line of code:

    var valu = $("#combobox").parent().children()[1].value;
    

    I was able to get the value of the combobox.

提交回复
热议问题