wdmg/bootstrap-tagsinput-plugin

Bootstrap 3 的标签输入

1.0.3 2019-12-05 00:18 UTC

This package is auto-updated.

Last update: 2024-09-27 10:26:29 UTC


README

Bootstrap 3 的标签输入

安装

$ npm install bootstrap-tagsinput-plugin
$ bower install bootstrap-tagsinput-plugin
$ yarn add bootstrap-tagsinput-plugin
$ composer require bootstrap-tagsinput-plugin

使用示例

例如使用 input-group

<div class="form-group">
    <label class="control-label" for="tags">Tags:</label>
    <input id="tags" name="tags" class="form-control" placeholder="Type your tags here..." value="one, two, three" />
</div>

...并通过脚本初始化

<script type="text/javascript">
    $(document).ready(function () {
        var tags = $('input#tags').tagsinput({
            delimiter: ','
        });
    });
</script>

选项

模板

状态和版本

  • v.1.0.3 - 添加 README.md
  • v.1.0.2 - 一些修复。向后兼容旧版本的 jQuery 的 $.ajax。
  • v.1.0.1 - 添加自动完成。
  • v.1.0.0 - 添加基础插件和样式表,示例。