autocomplete自动完成方法

关闭“自动完成”菜单

$(this).autocomplete( "close" );

完全删除自动完成功能

$(this).autocomplete( "destroy" );

禁用自动完成功能

$(this).autocomplete( "disable" );

启用自动完成功能

$(this).autocomplete( "enable" );

关联的值

$(this).autocomplete( "option" );

自动完成搜索方法

$(this).autocomplete( "search" );

menu元素的对象

$(this).autocomplete( "widget" );

值改变时触发

$(this).autocomplete({
	change: function( event, ui ) {}
});
$(this).on( "autocompletechange", function( event, ui ) {} );

隐藏菜单时触发

$(this).autocomplete({
	close: function( event, ui ) {}
});
$(this).on( "autocompleteclose", function( event, ui ) {} );

创建自动完成时触发

$(this).autocomplete({
	create: function( event, ui ) {}
});
$(this).on( "autocompletecreate", function( event, ui ) {} );

焦点移动到项目时触发

$(this).autocomplete({
	focus: function( event, ui ) {}
});
$(this).on( "autocompletefocus", function( event, ui ) {} );

打开或更新建议菜单时触发

$(this).autocomplete({
	open: function( event, ui ) {}
});
$(this).on( "autocompleteopen", function( event, ui ) {} );

在执行搜索之前触发

$(this).autocomplete({
	search: function( event, ui ) {}
});
$(this).on( "autocompletesearch", function( event, ui ) {} );

从菜单中选择项目时触发

$(this).autocomplete({
  select: function( event, ui ) {}
});
$(this).on( "autocompleteselect", function( event, ui ) {} );

你可能感兴趣的:(前端:JavaScript)