Sometimes, we want to put a clear button inside my HTML text input box as the iPhone does.
In this article, we’ll look at how to put a clear button inside my HTML text input box as the iPhone does.
How to put a clear button inside my HTML text input box as the iPhone does?
To put a clear button inside my HTML text input box as the iPhone does, we add an input with type search.
For instance, we write
<input type="search" placeholder="Search..." />
to set the type attribute of the input to search
to add a search input.
Conclusion
To put a clear button inside my HTML text input box as the iPhone does, we add an input with type search.