How to put a clear button inside my HTML text input box as the iPhone does?

Spread the love

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.

Leave a Reply

Your email address will not be published.