自动完成=“关闭”时,输入类型为密码不工作,使输入字段它上面启用自动完成 [英] autocomplete ='off' is not working when the input type is password and make the input field above it to enable autocomplete

查看:632
本文介绍了自动完成=“关闭”时,输入类型为密码不工作,使输入字段它上面启用自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有禁用自动完成的形式,但它不工作,使在Firefox启用的自动完成和铬更高版本

I have an form with autocomplete disabled but it does not works and makes the autocomplete to be enabled in firefox and higher version of chrome

<form method="post" autocomplete="off" action="">
    <ul class="field-set">
    <li>
        <label>Username:</label>
        <input type="text" name="acct" id="username" maxlength="100" size="20">
    </li>
    <li>
        <label>Password:</label>
        <input type="password" name="pswd" id="password" maxlength="16" size="20" >
    </li>
    <li>
        <input type="submit" class="button" value="Login" id="Login" name="Login">
    </li>
    </ul>
</form>

当类型是从密码已更改为文本它在所有的浏览器。
任何人都可以帮助解决这个问题?

When the type is changed from password to text it works in all browser. Can anyone help to solve this issue?

推荐答案

浏览器通常有两个尚未就有关表格不同的特点:

Browser's normally have two related yet different features regarding forms:


  • 表单自动完成,其中的项目&LT;输入类型=文本&GT; 键入(或类似)收集类型的值,并将其提供回形式下拉列表中。结果的(这是一个简单的功能,工作原理pretty好。)

  • Form auto-complete, where items of <input type="text"> type (and similar) collect typed values and offer them back in the form of a drop-down list.
    (It's a simple feature that works pretty well.)

密码管理器,浏览器会提示要记住用户名/密码组合,当它检测到您提交一个登录表单。当返回到现场,大多数浏览器显示一个下拉框提供的用户名(火狐,Chrome,IE浏览器...),但有一些工具栏按钮(歌剧)。此外,镀铬突出了硬件codeD黄色的字段。
结果的(这取决于启发式和某些网页可能会失败。)

Password manager, where browser prompts to remember username/password combinations when it detects you've submitted a login form. When returning to the site, most browsers display available usernames in a drop-down box (Firefox, Chrome, Internet Explorer...) but some have a toolbar button (Opera). Also, Chrome highlights the fields in hard-coded yellow.
(This depends on heuristics and might fail on certain pages.)

有是一个边缘的情况下与标记为自动完成=关闭的形式。如果它是一个登录表单,并且用户previously存储用户名/密码怎么办?其实删除的从本地数据库中的密码貌似不合适所以大概没有浏览器这样做。 (事实上​​,从形式自动完成数据也不会被删除。)火狐决定给电力用户:你有密码,所以我让你使用它。 Chrome的决定给力的网站。

There's an edge case with forms tagged as autocomplete="off". What happens if it's a login form and the user has previously stored a username/password? Actually removing the password from the local database looks like inappropriate so probably no browser does so. (In fact, data from form auto-complete is not erased either.) Firefox decides to give power to the user: you have a password, so I'll let you use it. Chrome decides to give power to the site.

这篇关于自动完成=“关闭”时,输入类型为密码不工作,使输入字段它上面启用自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆