相关疑难解决方法(0)

是否有一种W3C有效的方法来禁用HTML表单中的自动完成功能?

使用xhtml1-transitional.dtddoctype时,使用以下HTML收集信用卡号

<input type="text" id="cardNumber" name="cardNumber" autocomplete='off'/>
Run Code Online (Sandbox Code Playgroud)

将在W3C验证器上标记警告:

没有属性"自动完成".

是否有W3C /标准方法禁用表单中敏感字段的浏览器自动完成?

html forms standards w3c

421
推荐指数
12
解决办法
26万
查看次数

当输入类型为密码时,autocomplete ='off'不起作用,并在其上方输入输入字段以启用自动完成功能

我有一个禁用自动完成功能的表单但它不起作用并使自动完成功能在firefox和更高版本的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>
Run Code Online (Sandbox Code Playgroud)

当类型从密码更改为文本时,它适用于所有浏览器.任何人都可以帮忙解决这个问题吗?

html autocomplete

38
推荐指数
9
解决办法
9万
查看次数

如何抑制firefox密码字段完成?

我正在开发一个网站.我使用的是单页网页应用程序样式,因此网站的所有不同部分都是在index.php中进行AJAX.当用户登录并告诉Firefox记住他的用户名和密码时,网站上的所有输入框都会自动填充该用户名和密码.这是更改密码的表单上的问题.如何阻止Firefox自动填写这些字段?我已经尝试过给他们不同的名字和ID.

编辑:有人已经问过这个了.谢谢Joel Coohorn.

html firefox

15
推荐指数
2
解决办法
1万
查看次数

保存的用户名/密码在 Firefox 上出现在错误的字段中

我在 Firefox 上遇到了这个奇怪的错误,而不是 Chrome(均已更新)。

在我的网站的登录页面上,字段是:

<div class="input text required">
    <label for="ArchUtilisateurUsername">Identifiant :</label>
    <input name="data[ArchUtilisateur][username]" id="ArchUtilisateurUsername" type="text">
</div>
<div class="input password">
    <label for="ArchUtilisateurPassword">Mot de passe :</label>
    <input name="data[ArchUtilisateur][password]" id="ArchUtilisateurPassword" type="password">
</div>
Run Code Online (Sandbox Code Playgroud)

然后在另一个页面上,我有一个用于创建“读者”帐户的表单,该帐户与用户帐户不同。它使用读取的 ID 和密码作为登录信息,但在这种形式中,两者并不相邻。所以我有这个:

<div class="group-content">
    <div id="DivFieldLecteurFormCompteActif" class="input checkbox ">
        <input name="data[LecteurForm][compte_actif]" value="" type="hidden">
        <input name="data[LecteurForm][compte_actif]" id="FieldLecteurFormCompteActif" value="1" type="checkbox">
        <label for="FieldLecteurFormCompteActif">Compte actif</label>
    </div>
    <div id="DivFieldLecteurFormPassword" class="input password ">
        <label for="FieldLecteurFormPassword">Mot de passe</label>
        <input name="data[LecteurForm][password]" id="FieldLecteurFormPassword" autocomplete="off" type="password">
    </div>
    <div id="DivFieldLecteurFormPasswordConfirm" class="input password ">
        <label for="FieldLecteurFormPasswordConfirm">Confirmation</label>
        <input name="data[LecteurForm][password_confirm]" id="FieldLecteurFormPasswordConfirm" autocomplete="off" type="password"> …
Run Code Online (Sandbox Code Playgroud)

html firefox

3
推荐指数
1
解决办法
2912
查看次数

标签 统计

html ×4

firefox ×2

autocomplete ×1

forms ×1

standards ×1

w3c ×1