摘要:找到以下代码:代码如下: .bind( "blur.autocomplete", function( event ) { if ( self.options.disabled ) { return; }

小宝典致力于为广大程序猿(媛)提供高品质的代码服务,请大家多多光顾小站,小宝典在此谢过。

找到以下代码:

代码如下:

.bind( "blur.autocomplete", function( event ) {
if ( self.options.disabled ) {
return;
}

clearTimeout( self.searching );
// clicks on the menu (or a button to trigger a search) will cause a blur event
self.closing = setTimeout(function() {
self.close( event );
self._change( event );
}, 150 );
});

替换成:

代码如下:

.bind( "blur.autocomplete", function( event ) {
if ( self.options.disabled ) {
return;
}

clearTimeout( self.searching );
// clicks on the menu (or a button to trigger a search) will cause a blur event
self.closing = setTimeout(function() {
self.close( event );
self._change( event );
}, 150 );
}).bind('input',function (c) {//jQuery UI Autocomplete 1.8.*中文输入修正
self.search(self.item);
});

经过经验,在1.8.16-1.8.23(目前最新版本),均可实现。

找到以下代码:

代码如下:

.bind( "blur.autocomplete", function( event ) {
if ( self.options.disabled ) {
return;
}

clearTimeout( self.searching );
// clicks on the menu (or a button to trigger a search) will cause a blur event
self.closing = setTimeout(function() {
self.close( event );
self._change( event );
}, 150 );
});

替换成:

代码如下:

.bind( "blur.autocomplete", function( event ) {
if ( self.options.disabled ) {
return;
}

clearTimeout( self.searching );
// clicks on the menu (or a button to trigger a search) will cause a blur event
self.closing = setTimeout(function() {
self.close( event );
self._change( event );
}, 150 );
}).bind('input',function (c) {//jQuery UI Autocomplete 1.8.*中文输入修正
self.search(self.item);
});

经过经验,在1.8.16-1.8.23(目前最新版本),均可实现。

觉得可用,就经常来吧!Javascript技巧 脚本宝典 欢迎评论哦! js技巧,巧夺天工,精雕玉琢。小宝典献丑了!

本文固定链接:

js实例教程-firefox下jQuery UI Autocomplete 1.8.*中文输入修正方法

http://www.js-code.com/js/js_1085.html

80%的人都看过