How to turn off html input form field suggestions?

前端 未结 8 1340
难免孤独
难免孤独 2021-01-31 07:20

By suggestions I mean the drop down menu appear when you start typing, and it\'s suggestions are based on what you\'ve typed before:

for example when I type \'a

8条回答
  •  伪装坚强ぢ
    2021-01-31 07:36

    On Chrome, the only method we could identify which prevented all form fills was to use autocomplete="new-password". Apply this on any input which shouldn't have autocomplete, and it'll be enforced (even if the field has nothing to do with passwords, e.g. SomeStateId filling with state form values). See this link on the Chromium bugs discussion for more detail.

    Note that this only consistently works on Chromium-based browsers and Safari - Firefox doesn't have special handlers for this new-password (see this discussion for some detail).

    Update: Firefox is coming aboard! Nightly v68.0a1 and Beta v67.0b5 (3/27/2019) feature support for the new-password autocomplete attribute, stable releases should be coming on 5/14/2019 per the roadmap.

提交回复
热议问题