开发者

Auto select an item from a jQuery Autocomplete combobox

开发者 https://www.devze.com 2023-01-09 12:08 出处:网络
I have a page that is using a couple of jQuery\'s autocomplete comboboxes.I need to be able to autoselect an item from the list when the user clicks a button, or if a value is passed to the page for t

I have a page that is using a couple of jQuery's autocomplete comboboxes. I need to be able to autoselect an item from the list when the user clicks a button, or if a value is passed to the page for that combobox. How can I set the value of both the underlying selectbox AND the jQuery c开发者_如何学Goombobox?


Never mind, I found a solution. When each autocomplete combobox is created, I give it a unique id, then use that id to set the value using $('#comboBoxUniqueId').val($('#selectBox').val())

0

精彩评论

暂无评论...
验证码 换一张
取 消