How do you set a default value with jquery auto complete combobox?

后端 未结 14 1971
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 19:01

When using the jquery ui autocomplete combobox, can you set a default value for the combobox?

14条回答
  •  我在风中等你
    2020-12-28 19:17

    I have an answer that worked for my implementation of the jquery UI combobox. Somewhere in the middle of the code was this:

    .val(value)
    

    I changed it to:

    .val(select.val())
    

    and presto, the initial value of the underlying textbox appeared. Seems to me like this should be the default functionality, but what do I know?

提交回复
热议问题