如何通过 Javascript 从 jquery-tokeninput 插件获取添加的令牌 id、名称列表?
如何通过 Javascript 从此处找到的 jquery-tokeninput 插件获取令牌的 id、名称值对(由用户输入)? https://github.com/loopj/jquery-tokeninput
是我个人的问题还是这并不令人惊讶除了直接的 getEnteredTokens() 方法之外,这个插件还有很多功能吗?
提前致谢。
How can I get the id, name value pairs of the tokens (entered by a user) via Javascript from the jquery-tokeninput plugin found here? https://github.com/loopj/jquery-tokeninput
Is it just me or isnt it surprising that this plugin has a lot of features except a straight forward getEnteredTokens() method?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这有点晚了,但是你尝试过吗:
例如:(
其中 selector 是你需要返回 tokeninput 输入对象的任何 jQuery 选择器)
它返回对象中当前选定的所有 id/name 值。
I know this is kind of late coming, but have you tried:
for example:
(where selector is whatever jQuery selector you need to return the tokeninput input object)
It returns all of the currently selected id/name values in an object.