[未解决]jQuery中autocomplete的source格式问题

文档中写的是 http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions

可是我这么用

var a = new Array();

#(..).autocomplete(a);

报错 this.source is not a function

查了一下 http://stackoverflow.com/questions/3308935/jquery-autocomplete-this-source-is-not-a-function-error

他说要这么写

var a = new Array();

#(..).autocomplete({source:a});

这样写不会报错了,不过对formatItem这个方法还是不会用,网上的例子都不能使用,愁。

这个网站好像说了一下,但是也没有实质性进展。http://www.devbridge.com/projects/autocomplete/jquery/#demo

jq版本:

jquery-1.6.2.min

jquery-ui-1.8.16.custom.min

posted @ 2012-01-10 11:16  孤舟苦渡  阅读(1754)  评论(0编辑  收藏  举报