I have this code:
The html:
<input id="register_username" type="text"> <input id="register_password" type="text"> <input id="register_repeatpassword" type="text"> <input id="register_email" type="text">
The Jquery:
$(document).ready(function(){ $('#register_username').attr('autocomplete','off'); $('#register_password').attr('autocomplete','off'); $('#register_repeatpassword').attr('autocomplete','off'); $('#register_email').attr('autocomplete','off'); });
I want to disable the autocomplete feature offred by some browsers and acctually make the user type the entire field but the code is not working the dropdown menu still appear and the user still able to choose stuff the typed before. I also tried to user autocomplete="off"
but nothing happened. What am I doing wrong here ?
Add autocomplete="off" onto <form> element; Add hidden <input> with autocomplete="false" as a first children element of the form.
Sept 2020: autocomplete="chrome-off" disables Chrome autofill. Original answer, 2015: For new Chrome versions you can just put autocomplete="new-password" in your password field and that's it. I've checked it, works fine.
Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.
Approach: Create a div with the class as a container. Inside of this div, create another div with a class as a text-container that will contain the <input> tag & <datalist> tag. Declare the list attribute as programmingLanguages inside the <input> tag.
Just add:
autocomplete="off"
as attributes to the INPUT
elements, f.ex:
<input autocomplete="off" id="register_username" type="text" name="username">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With