How to disable IE10's password clear text display and quick clear function

How to disable IE10's password clear text display and quick clear function
IE10 provides a quick clear button (X icon) and a password text display button (small eye icon) for <input> and <input type="password"> respectively:

The quick clear button can replace a series of complex touch actions such as selecting all and deleting, while the password display button can help users confirm the input content, making up for the problems of slow touch typing and high error rate. However, based on the security of the Web system, this function needs to be disabled, especially the function of displaying passwords in plain text. This can be achieved by controlling the page view and CSS style.

1. First, add the following code to the HTML header of the web page to force IE browser not to use compatibility view:

Copy code
The code is as follows:

<meta http-equiv="X-UA-Compatible" content="edge" />

2. Disable the X and eye icons through CSS virtual elements (::-ms-clear, ::-ms-reveal). The specific code is as follows:

Copy code
The code is as follows:

input::-ms-clear{display:none;}
input[type="password"]::-ms-reveal{display:none;}

<<:  Implementing the preview function of multiple image uploads based on HTML

>>:  Pitfalls and solutions encountered in MySQL timestamp comparison query

Recommend

CSS3 uses animation attributes to achieve cool effects (recommended)

animation-name animation name, can have multiple ...

What is html file? How to open html file

HTML stands for Hypertext Markup Language. Nowada...

CentOS 7 Forgot Password Solution Process Diagram

need Whether it is a Windows system or a Linux sy...

How to find slow SQL statements in MySQL

How to find slow SQL statements in MySQL? This ma...

The difference between absolute path and relative path in web page creation

1. Absolute path First of all, on the local compu...

How to use SessionStorage and LocalStorage in Javascript

Table of contents Preface Introduction to Session...

In-depth analysis of the slow query problem of MySQL Sending data

Through an example, I shared with you the solutio...

Mini Program Development to Implement Unified Management of Access_Token

Table of contents TOKEN Timer Refresher 2. Intern...

Docker+nacos+seata1.3.0 installation and usage configuration tutorial

I spent a day on it before this. Although Seata i...

The big role of HTML meta

There are two meta attributes: name and http-equiv...

How to implement JavaScript output of Fibonacci sequence

Table of contents topic analyze Basic solution Ba...