开发者

How to implement something similar to Stack Overflows Tag's widgets?

开发者 https://www.devze.com 2023-03-26 21:57 出处:网络
In Stack Overflow, have noticed that once one is done writing an post and starts entering in specific tags inside the Tags text field , that the text of the tags becomes a cool little widget which is

In Stack Overflow, have noticed that once one is done writing an post and starts entering in specific tags inside the Tags text field , that the text of the tags becomes a cool little widget which is deletable via the X button (located on this widget).

May I ask if开发者_如何学运维 there is a popular 3rd party library that one can use to emulate this same situation ? That someone types something into a text field and the individual words inside the text field becomes turned into some ui element with an X on it ?

Otherwise, how can someone code a mechanism like this him / herself ? What type of CSS/HTML/JavaScript be needed ? Are these visual tags <div>s?

Thank you for taking the time to read this.


Check out Textboxlist.


http://harvesthq.github.com/chosen/ will transform your everyday <select> and <option> elements into this format. plus no license fee (although I wouldn't argue TextboxList's $20 fee is unreasonable)

0

精彩评论

暂无评论...
验证码 换一张
取 消