bootstrap-tagsinput禁止用户修改tag

阅读 53

2022-07-12


禁止用户修改:

$( "#tagsInputId" ).prop( "disabled", true );

参考:​​https://github.com/bootstrap-tagsinput/bootstrap-tagsinput/issues/112​​

设置分隔符:

$('input').tagsinput({
confirmKeys: [13, 44] //enter和逗号
});

设置最多输入tags个数:

$('input').tagsinput({
maxTags: 3
});

官方文档:
​​​https://bootstrap-tagsinput.github.io/bootstrap-tagsinput/examples/​​


精彩评论(0)

0 0 举报