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

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

可是我这么用

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

相关文章:

  • 2021-04-18
  • 2022-12-23
  • 2022-02-13
  • 2021-11-21
  • 2021-10-18
  • 2022-02-14
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-05-16
相关资源
相似解决方案