jQuery UI自动完成的JSON格式 [英] JSON format for jQuery UI Autocomplete

查看:67
本文介绍了jQuery UI自动完成的JSON格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

jQuery UI自动完成的文档指出,可以将source属性设置为以JSON格式返回建议项目的URL.但是,它没有进一步详细说明此JSON结果的结构应该是什么样子.有人可以举一个例子吗?谢谢!

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't elaborate further what the structure of this JSON result is supposed to look like. Could anyone post an example? Thanks!

推荐答案

这是JSON格式

{source: ["Milan", "Turin", "Venice", "Florence", "Rome"] }

或其他来源

{source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]}

这篇关于jQuery UI自动完成的JSON格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆