$("#select-processEmpid").select2({
????placeholder:"輸入一個負責人",//文本框的提示信息
????minimumInputLength:1,???//至少輸入n個字符,才去加載數據
????ajax:?{
????????url:?"url",
????????dataType:?'json',
????????delay:?250,
????????data:?function?(params)?{
????????????return?{
????????????????keyName:?params.term,?//?search?term
????????????};
????????},
????????processResults:?function?(data)?{
????????????return?{
????????????????results:data.responseContext
????????????};
????????}
????},
????templateResult:?formatRepo,
????templateSelection:?formatRepoSelection,
});英文文檔看不懂啊T_T,怎么給select2插件設置選中值。
select2插件設置初始值的問題,求大腿T_T
貓的第九尾
2015-12-25 11:27:44