Limit the result in jQuery Autocomplete

前端 未结 5 1566
情书的邮戳
情书的邮戳 2021-01-04 18:45

How can you set a limit on the result from the jQuery autocomplete?

This is my code:

        $.ajax({
            url: \"/cache/search/SearchModels.x         


        
5条回答
  •  Happy的楠姐
    2021-01-04 19:17

    Why not limit the data that your query returns from your xml source?

    Edit:

    You have to remember that the autocomplete functionality is essentially using a regex to match items in the datasource. Having a large datasource is bad because it has to parse so much data simply to find the correct item.

提交回复
热议问题