Auto select an item from a jQuery Autocomplete combobox
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())
精彩评论