Tag It 一款 Jquery控制項,當你在文字框中輸入逗號時,自動幫你分隔開相關內容

來源:互聯網
上載者:User

標籤:des   style   blog   http   color   io   使用   ar   sp   

Demo地址:http://webspirited.com/tagit/

使用方法:

除了JQuery指令碼外,下面的指令碼也是必須的,這些指令碼你都可以去GitHub下載:https://github.com/hailwood/jQuery-Tagit

<link href="~/Content/jquery.tagit.css" rel="stylesheet" />
<link href="~/Content/tagit.ui-zendesk.css" rel="stylesheet" />
<script src="~/Scripts/jquery-ui.min.js"></script>
<script src="~/Scripts/tag-it.min.js"></script>

HTML中,你的文字框替換成:<ul id="myTags"></ul>

然後加入一段Js:

    $(document).ready(function () {        //輸入逗號自動分割的控制項,Demo:http://webspirited.com/tagit/        $("#myTags").tagit({            allowSpaces: true,            singleField: true,//必須要加這個,不然會把Tag當作一個List給提交過去。            fieldName: ‘DailyEvaluateValues‘//這個是只你的欄位名稱,提交表單時會用這個name        });    });

使用就是這麼簡單!效果如下:

就是這麼爽,快來試試吧~~~~

Tag It 一款 Jquery控制項,當你在文字框中輸入逗號時,自動幫你分隔開相關內容

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.