4
私はjqueryオートコンプリートコンボボックスを使用しています。オートコンプリートJqueryUIコンボボックス+すべてのテキストを選択
訪問http://jqueryui.com/demos/autocomplete/#combobox。
問題は、このコンボボックスを作成して、ボックス内をクリックすると、内部のテキストが選択され、古いテキストを消去せずに次の検索を開始できるようにしたいと思います。私は$(ドキュメント).ready ...
//clear each option if its selected
$('#<%=combobox.ClientID %> option').each(function() {
$(this).removeAttr('selected')
});
//set the first option as selected
$('#<%=combobox.ClientID %> option:first').attr('selected', 'selected');
//set the text of the input field to the text of the first option
$('#<%=combobox.ClientID %> ').parent().children('input.ui-autocomplete-input').val(' ');
くぼみの仕事...あなたの助けを事前に
おかげでテストのために試してみました
ソリューション。
ありがとう!出来た!! – ysr