使用 jquery,如何像 Live Mail 处理电子邮件地址一样处理标签?
我需要一个类似标签的系统,其操作方式与 Live Mail 处理电子邮件地址的方式非常相似。
对于那些不知道的人,Live Mail 提供了一个文本框
,您可以在其中输入电子邮件地址。 当您完成电子邮件地址的输入后,Live Mail 会将地址从纯文本更改为具有边框且内部包含文本的 div。 如果您想删除该地址,请将鼠标悬停在该地址上,右侧会出现一个十字。 地址被“标记”后就无法更改。 如果要更改它,则需要将其删除并重新添加。
这是我需要的功能,只不过我将使用标签而不是电子邮件地址来执行此操作。
我想知道是否有人知道以这种方式工作的 jquery 组件。
干杯,安东尼
I have a need to have a tag-like system that operates very similarly to how Live Mail does email addresses.
For those who don't know, Live Mail provides a textbox
in which you can enter email addresses. As you finish typing in an email address, Live Mail changes the address from being plain text into a div that has a border and has the text within. If you want to remove the address, you hover over the address and a cross comes up on the right. You can't change an address after it has been "tagged." If you want to change it, you need to remove it and re-add it.
This is the functionality that I require, except that I will be doing this with tags instead of email addresses.
I was wondering if anyone knows of a jquery component that works in this fashion.
Cheers, Anthony
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
jquery facebook 自动完成 (通过 Ajaxian)
有一本关于 Jquery 1.6 UI,具有电子邮件自动完成功能以及自动完成功能的最后一个示例(图书源代码)。
jquery facebook autocomplete (via Ajaxian)
There's a book on Jquery 1.6 UI that has an auto-complete for emails as well as onle of the last examples of Autocomplete (book source code).
我从未听说过这样的 JQuery 插件,但自己完成应该不会太难。 然而,为了实现实际的外观,当然需要一些关于 CSS 的知识。
顺便说一句,我还没有测试过这些,但这应该会让你走上正轨。
哈!
I never heard of such a JQuery plugin, but it shouldn't be too hard to accomplish on your own. However, it will require some knowledge about CSS for the actual looks of course.
I haven't tested any of this by the way, but this should get you on the right track.
HTH!