I want to remove the default autocomplete from all input fields of my web application using CSS only. I will put that CSS in the header of my web application to get the effect of that css on all web pages. I can't put autocomplete=off in all input fields individually. as there are more than 200 input in the application.
Add a comment
|
2 Answers
It is not possible since autocomplete=off is not a css attribute, but a html5 one.
Maybe you want to do it with js by setting element's attr, or just find and replace those 200 entries once and for all.
More info on autocomplete=off can be found in MDN.
2 Comments
Ajay Singh
Can you suggest how can I do that using JS
William Chong
refer to stackoverflow.com/questions/2860712/… but personally I would prefer editing 200 html tags in a one-off (semi-)automated way using vim or sublime
It's not possible in CSS. You can achieve it by using JS.
1 Comment
Ajay Singh
Okay is it possible to get the effect on all pages using JS?