2015-04-29 28 views

回答

1

溫迪,有一個jQuery UI插件在github上(標籤它), 提供了像SO autocomplete tags

這裏是下載鏈接相同的功能: https://github.com/aehlke/tag-it

,這裏是主頁鏈接:http://aehlke.github.io/tag-it/

和小型演示代碼,你CA n使用如下

<script type="text/javascript"> 
    $(document).ready(function() { 
     $("#myTags").tagit(); 
    }); 
</script> 

<ul id="myTags"> 
    <!-- Existing list items will be pre-added to the tags --> 
    <li>javascript</li> 
    <li>python</li> 
    <li>haskell</li> 
</ul> 

見下文

enter image description here

截圖讓我知道如果任何需要幫助。