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

Should I use Bootstrap or jQuery Mobile for mobile web wap

Solving the problem Bootstrap is a CSS framework ...

About browser compatibility issues encountered and solutions (recommended)

Preface: Last Sunday, a senior asked me to help m...

Six border transition effects implemented by CSS3

Six effectsImplementation Code html <h1>CSS...

Vue implements start time and end time range query

This article shares with you how to query the sta...

In-depth explanation of Mysql deadlock viewing and deadlock removal

Preface I encountered a Mysql deadlock problem so...

CSS inheritance method

Given a div with the following background image: ...

How to create a MySQL database and support Chinese characters

Let's first look at the MySQL official docume...

Advertising skills in the Baidu Union environment (graphic tutorial)

Recently, students from the User Experience Team o...

Intellij IDEA quick implementation of Docker image deployment method steps

Table of contents 1. Docker enables remote access...

Batch replace part of the data of a field in Mysql (recommended)

Batch replace part of the data of a field in MYSQ...

How to build a React project with Vite

Table of contents Preface Create a Vite project R...

Linux bash: ./xxx: Unable to execute binary file error

Today I sent a small tool for Ubuntu to a custome...