The browser is not allowed to automatically fill in the user name, password

Source: Internet
Author: User

Sogou Browser, there will be user settings to remember the password form (user name and password) randomly placed in the site of other pairs appear in the User name and Password box. How to solve this kind of irresponsible hateful problem, there are many programs on the Internet, but ultimately did not.

First, the online search to put down the scheme:

1. Use autocomplete= "off" on input, but the user name and password are still remembered on some browsers.

2. Most browsers determine the password domain based on the type= "password" of the form field, so there is a way to "dynamically set the password domain" for this situation:

  

In the Sogou browser under the same control of the bark, is still not so, it does not appear after the start of loading the page, but once the input box is clicked, the type becomes the password box will still be immediately filled with data should not belong to it (as an input box, which is also a sad, sympathetic t_t ...). )

3. In the OnLoad event, empty the value of the password box, i.e.:

Window.load = function () {   document.getElementById (' Password domain ID '). value= ";   };  

If this is so long-used, do not have to surf the internet so much, JS has been ruthless pass

4. Use Flash to make a login form, in which case the browser does not log form information. Caishuxueqian, Flash I do not build, did not test whether it is effective.

5. This is more troublesome, it is possible to change the type= "password" to type= "text", because the type is not password will not appear to remember the password function, and then set a variable such as: Var val= "" or set a hidden field <input Type= "hidden" Name= "Val", and finally use Onpropertychange (IE) or oninput (other) to change the password to a line of dots, and assign the value to Val, and then return the Val value back, due to the same effect as the * number. The user is not visible. There are two difficulties with this approach:

(1) Heaven, earth Ah, on behalf of the password of the dot can not be found on the keyboard can not find Ah ...

(2) The number of dots used to display how to dynamically change according to the user's input (please forgive me for not thinking), because these two reasons this method is useless to my world

Second, I am very intelligent (purely personal wild desires) think of a very simple and can achieve the purpose of the method:

In the course of the experiment found that Sogou browser by remembering the value of the form field ID to determine the fill location, but the various values do not allow me to remove the ID of this god-inlaid properties of the Phnom Penh, so I think he sogou if it is in two adjacent user name and password input box automatically fill in the value, Then I put a foot in the middle of the pair of the user name box and the middle of the later small 33 password box into a pair, the ID of the original password box to pay small three, and then the three goods hidden, from the first password box to get rid of the trouble of being filled with data (user name June will not be assigned), when the user entered the password The statement through the ID to take the value of the statements do not have to change, it turns out that I was on the drip, I added a password between them the input box to pay the ID (not yet hidden), Sogou immediately honest:

It would have been like this:      After processing:    Add a new Password box instead of the original, pay it the ID  The original password box or the user really contact with the use, but the ID is not, Sogou will not give him to fill the data  

There is a way not to be so troublesome, inadvertently found, as long as the original password box and then add a password box again hidden (This password box does not add processing such as seven bad things), will also solve the problem, do not understand the scientific principles, preliminary speculation is to destroy the user name password two pairs of collocation form, But the simple password box inserted in the middle but not much effect:

    After adding a hidden password box to destroy the structure of the automatic filling form conforming  

The browser is not allowed to automatically fill in the user name, password

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.