阻止Chrome提示从输入框保存密码? [英] Prevent Chrome from prompting to save password from input box?
问题描述
Chrome最近更新了一个令人讨厌的弹出窗口,该窗口从地址栏中的图标下拉出来,并在用户提交表单时提示在页面上保存密码。此页面上没有其他输入框,并且没有其他浏览器提示保存此密码,所以我不知道Chrome为什么会这样做。它是一个密码,因此它不应该在输入框中显示为纯文本,但它不是应该永久保存的密码 - 它不是登录凭据。实际上,电脑用户并不知道这个密码是非常重要的 - 别人必须为他们输入密码 - 所以如果浏览器将其保存起来会很糟糕。
如何防止Chrome(以及所有浏览器)提示保存此密码?
< form action =/ .. 。method =postonsubmit =return pwFormIsSubmittable();>
< p>密码:< input autofocus =type =passwordname =1409_passwordstyle =width:100pxtabindex =1autocomplete =off>< / p> ;
< div class =tabSubmitButtons>
< input type =buttonname =event = defaultvalue =Cancelonclick =window.location ='...'tabindex =3>);
< input type =submitvalue =Submitonclick =submitForm();tabindex =2>
< input type =hiddenname =beginvalue =Yes >
<! - 其他隐藏的输入 - >
< / div>
< / form>
< / code> / pre>
解决方案一个解决方案或解决方法是添加< input type =passwordstyle =display:none/ >< / code>在真正的密码输入框上方,Chrome只会尝试保存它找到的第一个密码,如果它是空白的,它不会抛出对话框来保存。
Chrome was recently updated with an annoying popup that comes down from an icon in the address bar and prompts to save a password on the page when the user submits the form. There's no other input box on this page, and no other browser prompts to save this password, so I don't know why Chrome does. It is a password, therefore it shouldn't be visible as plain text in the input box, but it's not a password that should ever be saved - it's not login credentials. It's actually quite important the user of the computer does not know this password - someone else must enter it in for them - so if the browser saves it that would be bad.
How can you prevent Chrome (and all browsers) from prompting to save this password?
<form action="/..." method="post" onsubmit="return pwFormIsSubmittable();">
<p>Password: <input autofocus="" type="password" name="1409_password" style="width:100px" tabindex="1" autocomplete="off"></p>
<div class="tabSubmitButtons">
<input type="button" name="event=default" value="Cancel" onclick="window.location='...'" tabindex="3">");
<input type="submit" value="Submit" onclick="submitForm();" tabindex="2">
<input type="hidden" name="begin" value="Yes">
<!-- couple other hidden inputs -->
</div>
</form>
解决方案 One solution or workaround is to add <input type="password" style="display:none"/>
above the real password input box. Chrome only tries to save the first password it finds and if it's blank it won't throw up the dialog to save it.
这篇关于阻止Chrome提示从输入框保存密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!