如何使用 Javascript 在 chrome 中禁用保存密码气泡? [英] How do I disable the save password bubble in chrome using Javascript?

查看:38
本文介绍了如何使用 Javascript 在 chrome 中禁用保存密码气泡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要能够防止在用户登录后甚至出现保存密码气泡.

I need to be able to prevent the Save Password bubble from even showing up after a user logs in.

Autocomplete=off 不是答案.

Autocomplete=off is not the answer.

我还没有遇到过针对此问题提供安全解决方案的帖子.Chrome中的密码气泡真的没有办法关闭吗??

I have not come across a post that offers a secure solution for this issue. Is there really no way to disable the password bubble in Chrome??

推荐答案

我发现没有支持"的方式来做到这一点.

I found there is no "supported" way to do it.

我所做的是将密码内容复制到隐藏字段并在提交之前删除密码输入.

What I did was copy the password content to a hidden field and remove the password inputs BEFORE submit.

由于提交时页面上没有任何密码字段,浏览器从不要求保存.

Since there aren't any passwords fields on the page when the submit occurs, the browser never asks to save it.

这是我的 javascript 代码(使用 jquery):

Here's my javascript code (using jquery):

function executeAdjustment(){       
        $("#vPassword").val($("#txtPassword").val());
        $(":password").remove();        
        var myForm = document.getElementById("createServerForm");
        myForm.action = "executeCreditAdjustment.do";
        myForm.submit();
    }

这篇关于如何使用 Javascript 在 chrome 中禁用保存密码气泡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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