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

后端 未结 18 1410
心在旅途
心在旅途 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:32

    I would be very surprised if W3C would have proposed a way that would work with (X)HTML4. The autocomplete feature is entirely browser-based, and was introduced during the last years (well after the HTML4 standard was written).

    Wouldn't be surprised if HTML5 would have one, though.

    Edit: As I thought, HTML5 does have that feature. To define your page as HTML5, use the following doctype (i.e: put this as the very first text in your source code). Note that not all browsers support this standard, as it's still in draft-form.

    
    

提交回复
热议问题