jquery autocomplete get selected item text

后端 未结 4 596
傲寒
傲寒 2021-02-07 04:22

I am wondering how to grab the selected item\'s text value on jquery autocomplete.

I have initialised jquery as following :

$(document).ready(function ()         


        
4条回答
  •  庸人自扰
    2021-02-07 05:04

    You just grab the value from the input in the same way you would if the user had typed it in themself:

    $('input#autocomplete').val()
    

提交回复
热议问题