jQueryのautocompleteを使用していまして、
inputタグに入力してフォーカスアウトした時点で、入力したdataをidタグのresult_nameに出力したいんですが
どうすればいいでしょうか?現在はconsoleで出してる状態です。
html
1<input type="text" id="suggest"> 2<div id="result_name"></div>
javascript
1 $(function () { 2 var data = [ 3 'apple', 4 'aaa', 5 'abb', 6 'bbb', 7 'apple', 8 ]; 9 $('#suggest').autocomplete({ 10 source: data, 11 autoFocus: true, 12 delay: 100, 13 minLength: 1, 14 }); 15 }).focusout(function() { 16 console.log('focusout()から実行されました!'); 17 })
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/08 09:07