input textbox: mimic “clear text” X button just like select2 dropdown component
问题 I've been using select2 as my UI of choice for my website. However, I noticed that there is a feature used for select2 that I feel should be used for my textbox; the clear all feature. http://ivaynberg.github.io/select2/ I've seen numerous posts around the web on how to add a clear button into a textbox element, but none seemed to suit my interests. Because I'm working with select2, I want my input boxes to have the same look at and feel as my select2, which is to include the "clear button".