크롬에서 자동완성기능 막기

catch me if u can!·2021년 2월 9일
0
  1. form, input 태그에 autocomplete="no"속성을 추가한다.
  2. input[type=password]는 autocomplete="new-password"속성을 추가한다.
  3. input[type=password]인 태그의 type속성을 제거하고, 아래와 같은 css를 추가한다.
<style>
  input.password { -webkit-text-security:disc; }
</style>
<body>
  <input id="user-password" class="password">
</body>
  1. input[type=password]의 autocomplete이벤트를 오버라이드한다.

    https://jqueryui.com/

$("#user-password").autocomplete({
  focus: function(event, ui) {
    return false;
  }
});
profile
마쿠투소케 난쿠로나이사

0개의 댓글