Analysis and solution of the cause of web page style loss caused by browser automatic form filling

Analysis and solution of the cause of web page style loss caused by browser automatic form filling
From the backend to the front end, what a tragedy. When I integrated someone else's CSS into my jsp web page, a strange phenomenon occurred.

The other party provided me with an HTML file, and after opening it, the style displayed was normal. I then copied the code into my jsp page and a strange phenomenon occurred. This is a login page, including a username input box and a password input box. Deploy the web page to the web server and open it through the browser to find that the styles of the two input boxes are lost. The style can be displayed normally only if the name attributes of the two input boxes are set to the same name.

I checked with the Chrome plug-in and found that there are corresponding styles, but these styles are invalid when displayed in the browser and are replaced by the styles that come with WebKit. However, there is no problem opening it with the same version of browser on other machines. Finally, a colleague who was familiar with web development helped me find the reason. It was because I had saved the username and password of this login page in the browser when I tested it on my local machine. When I opened this page, Chrome automatically filled in the username and password, and replaced the web page style with the webkit default style, which is an input box with a yellow background to prompt the user that this is the automatically filled form content. Just clear the username and password of this webpage saved by Chrome.

<<:  Interpretation and usage of various React state managers

>>:  Five ways to achieve automatic page jump in HTML

Recommend

Detailed explanation of CSS style sheets and format layout

Style Sheets CSS (Cascading Style Sheets) is used...

MySQL 5.7.24 installation and configuration graphic tutorial

This article shares the installation and configur...

Key features of InnoDB - insert cache, write twice, adaptive hash index details

The key features of the InnoDB storage engine inc...

js to implement verification code interference (dynamic)

This article example shares the specific code of ...

How to reset the root password in mysql8.0.12

After installing the database, if you accidentall...

How to write high-quality JavaScript code

Table of contents 1. Easy to read code 1. Unified...

Share the pitfalls of MySQL's current_timestamp and their solutions

Table of contents MySQL's current_timestamp p...

How to deploy Vue project under nginx

Today I will use the server nginx, and I also nee...

display:grid in CSS3, an introduction to grid layout

1. Grid layout (grid): It divides the web page in...

Examples of optimistic locking and pessimistic locking in MySQL

The task of concurrency control in a database man...

nginx proxy_cache batch cache clearing script introduction

Preface: I used the official nginx proxy_cache as...

MySQL data insertion efficiency comparison

When inserting data, I found that I had never con...

HTML Tutorial: DOCTYPE Abbreviation

When writing HTML code, the first line should be ...

Vue codemirror realizes the effect of online code compiler

Preface If we want to achieve the effect of onlin...