Home >Web Front-end >JS Tutorial >Solution to the bug that the autocomplete='off' setting does not work in Firefox_javascript skills
Auto-completion has also become automatic. The most classic one is Google’s search box. After entering a letter, the user will be given many prompts to choose from.
Looking at the source code, you will find that autocomplete="off" is added to the input box. This is to block the default memory function of the browser form. The search boxes of Taobao and Baidu also have this attribute. The autocomplete attribute is non-standard. It was first added in IE5 and later supported by other browsers. html5 also makes its lists standard.
But there is a bug in Firefox. After the first submission, FF will prompt whether to remember the password of a certain website. After clicking "Remember", setting autocomplete="off" in input[type=text] will not work. As follows
The default setting of FF is "Remember website password"
There are two situations:
1. There is no input[type=password] in the form, autocomplete="off" will work
2. Remove the form and set input[type= text]’s autocomplete also works