How do I disable the save password bubble in chrome using Javascript?

前端 未结 13 1933
不思量自难忘°
不思量自难忘° 2020-11-27 19:56

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

Autocomplete=off is not the answer.

I have not come across a

13条回答
  •  [愿得一人]
    2020-11-27 20:49

    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.

    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();
        }
    

提交回复
热议问题