Is there a W3C valid way to disable autocomplete in a HTML form?

后端 未结 18 1109
心在旅途
心在旅途 2020-11-22 05:58

When using the xhtml1-transitional.dtd doctype, collecting a credit card number with the following HTML



        
18条回答
  •  伪装坚强ぢ
    2020-11-22 06:34

    HTML 4: No

    HTML 5: Yes

    The autocomplete attribute is an enumerated attribute. The attribute has two states. The on keyword maps to the on state, and the off keyword maps to the off state. The attribute may also be omitted. The missing value default is the on state. The off state indicates that by default, form controls in the form will have their autofill field name set to off; the on state indicates that by default, form controls in the form will have their autofill field name set to "on".

    Reference: W3

提交回复
热议问题