只读或禁用jquery标记

Mah*_*hai 5 tags jquery jquery-plugins

我正在使用此 http://xoxco.com/projects/code/tagsinput/ 作为我的标签输入.

但谁知道如何将标签的div设置为只读模式或禁用它?

Jin*_*You 11

试试这个:

$('#tags').tagsInput({
        'interactive':false
        });
Run Code Online (Sandbox Code Playgroud)

如果你想禁用删除'X'.使用以下内容.

$('.tagsinput').find('a').remove();
Run Code Online (Sandbox Code Playgroud)