Autocomplete=off is used to set for the input fields inhtml. But this shows a warning like attribute not defined. this is not defined by w3c standards. So it throws the warning. This is introduced by MS.
Use it like document.getElementById("elementId").setAttribute("autocomplete", "off");
this will not throw any warning.