![](/img/trans.png)
[英]tokeninput jquery plugin - preventDuplicates not working
[英]Problems with the jquery plugin Tokeninput
我使用的jQuery插件Tokeninput允許在textBox中自動完成。 我會阻止用戶在自動完成下拉菜單中選擇重復的單詞。
有人有解決此問題的建議嗎?
非常感謝。
看起來好像有一個preventDuplicates的設置,該設置可以防止用戶通過將其設置為true來選擇重復的值。 默認值為false,您希望將其設置為true。
$(document).ready(function() {
$("#demo-input").tokenInput("path/to/list", {
preventDuplicates: true
});
});
您還可以在此處查看演示: http : //loopj.com/jquery-tokeninput/demo.html#prevent-duplicates 。 希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.