Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Disable input field autofill (pure JS)

Does anyone know how to disable input autofill/autocomplete in 2021 using pure JS?

I've tried:

<input type="password" autocomplete="off" />
<input type="password" autofill="off" />
<input type="password" autocomplete="new-password" />
<input type="password" autofill="none" />

etc.

Also tried using jquery.disable-autofill and npm disableautofill from the stackoverflow solutions

Gonna be good if someone can share some more solutions

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

one more thing we can use autocomplete in form tag also like see below

<form action="/form/submit" method="get" autocomplete="off">

Or In JS

    $(function() {
      setTimeout(function() {
        $("input").val("");
      }, 500);
   });
about 4 years ago · Juan Pablo Isaza Denunciar

0

Try This Solution in JS

clearAutoFIll();

function clearAutoFIll(){
  var inp = document.querySelectorAll("[autocomplete=off] input");
  for(var x=0; x < inp.length; x++){
    inp[x].value = "";
  }
}
<form autocomplete=off>
  <input type=text name="phone" />
</form>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda