Home > Web Front-end > JS Tutorial > body text

How to clear the cross in the IE10+ input X text box and the eye icon in the password input box

高洛峰
Release: 2017-01-10 09:33:26
Original
1362 people have browsed it

Starting from IE 10, the input with type="text" will automatically generate a small cross (X) after the user enters the content, making it convenient for the user to click to clear the entered text.

For input with type="password", a small eye icon will be displayed on the right. Clicking this icon can display the entered content.

It’s good, but sometimes it’s superfluous, such as when this function has been controlled with js.

As long as you use the following CSS code, you can easily hide the text delete button and password view button that come with IE browser.

::-ms-clear,
::-ms-reveal
{
display:none;
}
Copy after login

Among them::-ms-clear is the text clear button, which is the cross on the right side of input::-ms-reveal is the password view button, which is the cross on the right side of the password box Small Eyes.

Of course, you can also clear one of them individually. This is your freedom.

The above is the editor’s introduction to how to clear the cross in the IE10+ input , the editor will reply to everyone in time. I would also like to thank you all for your support of the PHP Chinese website!

For more related articles on how to clear the cross in the IE10+ input X text box and the eye icon in the password input box, please pay attention to 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
Popular Tutorials
More>
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!