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

Sample code for implementing multi-application deployment using tomcat+nginx

Table of contents Multi-application deployment 1-...

Two ways to achieve horizontal arrangement of ul and li using CSS

Because li is a block-level element and occupies ...

Web Design Experience: Self-righteous Web Designers

1. Trash or Classic? Web technology updates very ...

Detailed explanation of the correct way to open em in CSS

Why do we say “usually 1em=16px”? The default tex...

Mysql index types and basic usage examples

Table of contents index - General index - Unique ...

Solve the problem of using swiper plug-in in vue

Since I used this plugin when writing a demo and ...

Detailed process of installing and configuring MySQL and Navicat prenium

Prerequisite: Mac, zsh installed, mysql downloade...

Detailed steps to install web server using Apache httpd2.4.37 on centos8

Step 1: yum install httpd -y #Install httpd servi...

Is mysql a relational database?

MySQL is a relational database management system....

Detailed explanation of Angular component life cycle (I)

Table of contents Overview 1. Hook calling order ...

SystemC environment configuration method under Linux system

The following is the configuration method under c...

Tomcat CentOS installation process diagram

Tomcat CentOS Installation This installation tuto...