简体   繁体   中英

How to disable autocomplete of an input text after creating own autocomplete

I have a problem and I can't figure how to solve it.

After registering, the user is redirected to a page and they must enter their city, and then a city list corresponding to what they are writing is displayed, and I have done this by creating my own autocomplete.

The problem, however, is that the browser now does not respect the autocomplete="false" of autocomplete="off" .

Note that there is no password field. What should I do ?

A turn-around is that if I set autocomplete="new-password" then there is no autocomplete in the browser.

Should I use it, even if it's not a password?

I would like to have no autocomplete on all the browsers. Is it possible?

你可以试试这个:autocomplete =“__ away”

you should put autocomplete="off" both on the form, AND on the input element itself. That way you cover all the nonstandardness of browsers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM