开发者

in this jquery-ui example, what is the expected json from the server?

开发者 https://www.devze.com 2023-02-11 17:30 出处:网络
in this example should you be returning an array in json or 开发者_开发百科a single comma seperated string?this is the requested link, and it returns JSON:

in this example should you be returning an array in json or 开发者_开发百科a single comma seperated string?


this is the requested link, and it returns JSON:

http://jqueryui.com/demos/autocomplete/search.php?term=t


Looking at the source code (you can view source farther down on the page - have to expand it), it looks like it returns a JSON format.

function(request, response) {
    $.getJSON("search.php", {
        term: extractLast(request.term)
    }, response);
},

Another way of seeing what you need is use the developer tools in your browsers (or the Firebug plug-in in Firefox) to see what is being transferred between the server and host as you type.

0

精彩评论

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