我需要允许用户选择只允许在select标签。
目前我有:
$("input#id_txtcolor").select2({tags:["red", "green", "blue"]});
你能帮我吗?
发布于 2013-02-11 08:56:39
从3.3开始,当使用总是返回null的标签时,您可以指定自己的createSearchChoice,从而防止创建默认选项。
$().select2({
createSearchChoice: function() { return null; },
tags:...
});
https://stackoverflow.com/questions/14756309
复制相似问题