Shr*_*hri 5 javascript jquery jquery-plugins
$("#responsible").tokenInput(
[
{id: 7, name: "a@gmail.com"},
{id: 11, name: "b@gmail.com"},
{id: 13, name: "c@gmail.com"},
{id: 17, name: "d@gmail.com"},
{id: 19, name: "e@yahoo.com"},
{id: 23, name: "f@gmail.com"},
{id: 29, name: "abc@gmail.com"},
{id: 31, name: "ab@gmail.com"}
],{
prePopulate: respArray,
hintText: "Enter mailid",
allowCustomEntry: true,
theme : "facebook",
noResultsText: "O noes",
searchingText: "Searching...",
minChars: 1,
tokenLimit: 1,
tokenValue: "name",
preventDuplicates: true
}
);
Run Code Online (Sandbox Code Playgroud)
使用 @Cindrella\xef\xbc\x9a 进行测试
\n\n$("#responsible").tokenInput(\n [\n {id: 7, name: "a@gmail.com"},\n {id: 11, name: "b@gmail.com"},\n {id: 13, name: "c@gmail.com"},\n {id: 17, name: "d@gmail.com"},\n {id: 19, name: "e@yahoo.com"},\n {id: 23, name: "f@gmail.com"},\n {id: 29, name: "abc@gmail.com"},\n {id: 31, name: "ab@gmail.com"}\n ],{\n prePopulate: respArray,\n hintText: "Enter mailid",\n allowCustomEntry: true,\n theme : "facebook",\n noResultsText: "O noes",\n searchingText: "Searching...",\n minChars: 1,\n tokenLimit: 1,\n tokenValue: "name",\n allowFreeTagging: false, // \xef\xbc\x81ADD THIS \xef\xbc\x81\n preventDuplicates: true\n }\n);\nRun Code Online (Sandbox Code Playgroud)\n