Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the function of forbidding form user name and password to fill in automatically in jQuery

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article Xiaobian for you to introduce in detail "jQuery how to achieve the prohibition of form user name, password automatic filling function", detailed content, clear steps, details handled properly, I hope that this "jQuery how to achieve prohibition of form username, password automatic filling function" article can help you solve doubts, following the editor's ideas slowly in-depth, together to learn new knowledge.

Html login forms are often filled out automatically, and even websites where users have never logged in are filled out automatically, which is very annoying.

Mozilla developer documentation recommends using the form setting property tautocomplete= "off" to prevent browsers from getting data from cache to populate the login form.

However, this scheme is not compatible with some Chrome and Firefox.

In the end, it was decided to use hidden input to accept browser auto-fill, which does not affect the user experience and is compatible with all browsers.

PS: take a look at the ability to prevent forms from automatically filling in usernames and passwords

Some browsers support: autocomplete= "off"

So browsers support:

Add the following two codes to the from that will be automatically populated

Read this, the "jQuery how to achieve the prohibition of form user name, password automatic filling function" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more related articles, welcome to pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report