Firefox autocomplete= "Off" setting does not work with bugs solution _javascript tips

Source: Internet
Author: User
Automatic completion is automatically completed, the most classic such as Google's search box, enter a letter will give users a lot of prompts to choose

See the source code will find the input box plus autocomplete= "off", this to screen browser form default memory function. Taobao, Baidu's search box also has this attribute. The AutoComplete attribute is non-standard and is first added to the IE5 and is supported by other browsers. HTML5 also lists its criteria.

But there's a bug in Firefox. After the first submission, FF will prompt whether to remember a certain website password, click "Remember" after Input[type=text] set autocomplete= "Off" will not work. As follows

Copy Code code as follows:

<! DOCTYPE html>
<title>firefox autocomplete= "Off" bug</title>
<body>
<form name= "MyForm" action= "http://www.baidu.com" >
<input type= "text" name= "search" autocomplete= "Off"/>
<input type= "password" name= "password"/>
<input type= "Submit" value= "Submit"/>
</form>
</body>

The FF default setting is "Remember site password"


There are two kinds of situations:
No input[type=password],autocomplete= "off" in 1,form will work
2, remove form, set Input[type=text] AutoComplete also work

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.