0
我在我的网站上使用这个http://jqueryui.com/demos/autocomplete/#multiple-remote,我可以看到这段代码'搜索'search.php没有人知道什么格式的search.php应该是什么样的,它应该是什么样子?jQuery Autocomplete Remote
谢谢,
我在我的网站上使用这个http://jqueryui.com/demos/autocomplete/#multiple-remote,我可以看到这段代码'搜索'search.php没有人知道什么格式的search.php应该是什么样的,它应该是什么样子?jQuery Autocomplete Remote
谢谢,
从您链接的页面,它显示您预期的数据格式。 (粘贴在下面)最简单的方法是,您可以在search.php文件中打印一条简单的声明,回复一些硬编码的内容。更详细的解决方案是让你的search.php从数据库中实时抽取数据,然后按预期格式化数据。
Expected data format
The data from local data, a url or a callback can come in two variants:
An Array of Strings:
[ "Choice1", "Choice2" ]
An Array of Objects with label and value properties:
[ { label: "Choice1", value: "value1" }, ... ]
所以,刚离开地面,看看它的工作,使用该行的search.php并建立从那里通过自定义您的选择,或者连接到数据库等
print '[ "Choice1", "Choice2" ]';