There is an HTML form on the bootstrap. It has 2 input tags, the first type = "email", the second type = "password". If the input with the password type is not yet empty the name attribute, then in Google Chrome after loading the page for both inputs the background becomes yellow and the input with the email type is assigned the value “admin”, and the password is filled in with the password type. How to get rid of it? autocomplate = "off" does not help.
- No ... honest, no way. They so intrusively included this feature that all the methods described on the Internet simply do not help. - NeedHate
- In general, tin ((who asked them ... looks neither to the village nor to the city. - heff
- by the way on hh.ru they somehow overcame it - heff
- autocomplate or autocomplete? - sercxjo
- autocomplete = "off" - heff
|
2 answers
I work the following ways together:
- autocomplete = "false" on form
- value = '****' from input, and erase onload (some browser had a logic not to rewrite the filled fields).
- setTimeout with erasing values in a split second after loading.
|
In general, the following helped: set the readonly attribute to input with the password type and put in it onfocus = "this.removeAttribute ('readonly');
<input type="password" class="form-control input-lg" name="password" placeholder="Ваш пароль" required="required" autocomplete="off" readonly onfocus="this.removeAttribute('readonly');" > True, after that he accepts the color of the inactive element, so he needs to set styles that will make him a normal background, for example:
#auth_form input { background-color: #FFFFFF !important; } True, this approach does not guarantee that with the release of a new version of a browser in it, it will not stop working (exactly like everyone else).
- and if to remove the readonly attribute after loading? - sercxjo 8:48 pm
- I tried, it did not work out, the method that I described turned out to be the only working at that time. True setinterval I did not do. - heff
|