autocomplete的select选项怎么用,官方没有说明?

liujianliang 2011-08-25 05:42:15
autocomplete的select选项怎么用,官方没有说明?
...全文
448 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 liujianliang 的回复:]
太神了,我怎么没发现
[/Quote]
呵呵,很多时候学习效果的好坏就取决于是否细心了。
liujianliang 2011-08-27
  • 打赏
  • 举报
回复
太神了,我怎么没发现
lsw645645645 2011-08-25
  • 打赏
  • 举报
回复
[Quote=引用楼主 liujianliang 的回复:]
autocomplete的select选项怎么用,官方没有说明?
[/Quote]
官方有说明的呀

Triggered when an item is selected from the menu; ui.item refers to the selected item. The default action of select is to replace the text field's value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing.

Code examples
Supply a callback function to handle the select event as an init option.
$( ".selector" ).autocomplete({
select: function(event, ui) { ... }
});Bind to the select event by type: autocompleteselect.
$( ".selector" ).bind( "autocompleteselect", function(event, ui) {
...
});
abcd_ufo 2011-08-25
  • 打赏
  • 举报
回复
http://jqueryui.com/demos/autocomplete/remote.html

他这个是 一个单独的例子页面 你可以不可以把他 抠出来 做出来一个demo 这样不就行了吗
liujianliang 2011-08-25
  • 打赏
  • 举报
回复
先点开View Source看样例源码
liujianliang 2011-08-25
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 qianzai5765638 的回复:]
刚才给你发的那个呢
我始终相信 谁做出来一个产品.. 如果没有文档 .. 那我就感觉他做的不是产品..
[/Quote]
你不信么,那我发给你看http://jqueryui.com/demos/autocomplete/#remote
在options哪一项是没有select这个参数说明的
abcd_ufo 2011-08-25
  • 打赏
  • 举报
回复
刚才给你发的那个呢

我始终相信 谁做出来一个产品.. 如果没有文档 .. 那我就感觉他做的不是产品..
liujianliang 2011-08-25
  • 打赏
  • 举报
回复
我不是小白,全部都问过了,都无解,官方都没有这个说明
abcd_ufo 2011-08-25
  • 打赏
  • 举报
回复
http://waiting.iteye.com/blog/714655

lz 希望lz 可以先 问哈 谷哥 然后 在问哈 度姐 这样 比发帖效率 要高

87,990

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧