Summary
has been tossing the H5 application of the mail recently, in order to ensure that it can be used on the pc,ios,android side, so use the H5 page to embed the app WebView.
Page
The UI is probably like this
Jquery tagsinput Download: http://xoxco.com/projects/code/tagsinput/
First to introduce JS and CSS
Input box
The above input box, has the default value, you can call Tagsinput method directly, make it into tags
If you want to add the AutoComplete feature, you can add the following parameters
$ (' #tags '). Tagsinput ({
autocomplete_url: ' Http://myserver.com/api/autocomplete ')
You can add and remove tags through the Addtag and Removetag methods.
$ (' #tags '). Addtag (' foo ');
You can add more than one tag at a time by using the following method
Note: If the method is empty, the input content is emptied.
You can tell if a tag already exists
If you want to do something else after adding or deleting it, the plugin also provides a callback function to add and remove.
$ ("#tags"). Tagsinput ({////
' Autocomplete_url ': URL_TO_AUTOCOMPLETE_API,/////
' AutoComplete ': {option: Value, Option:value},
//' height ': ' 100px ',
//' width ': ' 300px ',
//' interactive ': true,
//' DefaultText ': ' Add a tag ',
//' Onaddtag ': function (tag) {
//console.log (' added ', tag);
},
//' Onremovetag ': function (tag) {
//console.log (' removed ', tag);
},
//' OnChange ': function (tag) {
//Console.log (' changed ', tag);
},
//' delimiter ': [', ', '; '],//or a string with a single delimiter. Ex: '; '
' Removewithbackspace ': true,
//' Minchars ': 0,
//' Maxchars ': 0,//If not provided there is no limit
// ' Placeholdercolor ': ' #666666 '
//});