Combining a local source and remote source in jquery ui autocomplete
问题 I included locally in javascript a list of commonly used terms, and then I would also like to get json response from the server through ajax response. How can it be done? var projects = ["apple", "orange"]; $('#search').autocomplete({ source: projects }); then append the result from ajax? 回答1: The way you would go about this would be to combine the results you get back from the server with the local results array. You can accomplish this by passing a function to the source option of