When developing an html form, there are many occassions where you might want to disable Mozilla’s or Internet Explorer’s auto-complete feature. This may be for credit card payment or login forms. Whatever your case may be, the following code will disable autocomplete in a form element.
<input type="text" name="login" value="" autocomplete="off" />
As you can see, by using DOM you effectively hide the attribute that does not validate.