Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1 つのページに 5 つの jquery コンボボックスがあり、ユーザーがクリックしたときにコンボボックスからテキストを削除したいと考えています。これにより、選択したコンボボックスからテキストのみが削除されます。
次のコードを使用して、ドロップダウンを jquery コンボボックスに変換します
$(function() { $( "select" ).combobox(); });
私はより良いことができると思います
$("select").focus( function(){ $(this).val(""); } );
[TAB]キーでも動作するはずだから...
私は正しい?
これを試して
$("select").focus( function(){ $(this).html(""); });