自动完成更改无效 [英] Auto complete Change not working
问题描述
< input type =textid =selector>
<input type="text" id="selector">
jQuery(function(){
$('#selector').autocomplete("URL");
});
此功能对我有用。
但是当自动完成更改时它应该触发ajax调用。
This function is working for me.
But it should fire a ajax call when changes happened in auto complete.
$('#selector').change(function(){
alert($('#selector').val());
});
上述代码无效。假设我在自动完成时输入值为循环,
更改事件仅传递循环的第一个字符。
当自动完成框中发生更改时,任何人都可以帮助获得全部价值。
The above code is not working properly. Suppose if i enter value as "Cycle" in auto complete,
the change event passing only a first character of "Cycle".
Please can anyone help to get full value when change happened in auto complete box.
推荐答案
(' < span class =code-string>#selector')。autocomplete( URL);
});
('#selector').autocomplete("URL"); });
此功能对我有用。
但是当自动完成更改时它应该触发ajax调用。
This function is working for me.
But it should fire a ajax call when changes happened in auto complete.
(' #selector')。change( function (){
alert(
('#selector').change(function(){ alert(
(' #selector')。val());
});
('#selector').val()); });
上面的代码不能正常工作。假设我在自动完成时输入值为循环,
更改事件仅传递循环的第一个字符。
任何人都可以帮助在自动完成框中发生更改时获得全部价值。
The above code is not working properly. Suppose if i enter value as "Cycle" in auto complete,
the change event passing only a first character of "Cycle".
Please can anyone help to get full value when change happened in auto complete box.
这篇关于自动完成更改无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!