2
我正在使用EricHynds Multiselect過濾器插件。當我們在輸入字段中輸入一些文本時,它會過濾出現在下拉列表中的值。但是我想在用戶在輸入中輸入一些文本時發送一個Ajax請求我可以很容易地處理Ajax數據,但我無法獲取輸入字段值。來自EricHynds Multiselect過濾器輸入的值
直到現在我寫下面的代碼:
$(".container_filter").multiselect({}).multiselectfilter({
filter: function(event, matches){
console.log(event.currentTarget);
}
});
但是從中我不能讓輸入字段的值。 我的console.log(event.currentTarget)
返回<input type="search" placeholder="Enter keywords">
。
當我使用console.log(event.currentTarget.val())
時,它返回undefined
。
只是試試這個。 – user2995087
工作很好。 Thnks。 :) – user2995087
不客氣.. –