Two JS methods to add small icons to Input

小云云
Release: 2017-12-22 10:36:53
Original
4065 people have browsed it

In this article, we mainly introduce two JS methods to add small icons to Input. When building a website, you often need to add the small icon function to Input. It seems that the function is very simple, but it is still a bit tricky to implement. The editor below will introduce to you two methods of adding small icons in JS Input. Friends who need it can refer to it. I hope it can help you.

Method 1

Insert the small icon as the background of the input and enter the code directly:


 

Copy after login

Method 2

Use i tag to insert


##

 

Copy after login
Related recommendations:


JS imitation Alipay input input display digital magnifying glass

javascript input input box fuzzy prompt function detailed explanation

How to distinguish input boxes and buttons

The above is the detailed content of Two JS methods to add small icons to Input. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!