JSON format for jQuery UI Autocomplete

前端 未结 6 903
青春惊慌失措
青春惊慌失措 2021-02-19 05:20

The documentation for jQuery UI Autocomplete states that the source property can be set to a URL that returns the suggested items in JSON format. However, it doesn

6条回答
  •  暖寄归人
    2021-02-19 05:40

    Here is a real-world example, but it uses a JSONP remote datasource: http://www.highpoint.edu/admissions/contact.cfm

    The High School field uses autocomplete (make sure you Choose 'Freshman' for type of admission b/c otherwise the high school field will be hidden). Also, changing country/state selection will alter the autocomplete source somewhat, which might add some confusion.

    Also, that URL is just a wrapper for an iframe with the real form, which I cannot post a link to b/c new users can only post one URL in a comment.

提交回复
热议问题