Jsp页面标签禁止默认填充黄色背景(亲测有效)

一、jsp的<h:tex>标签只能使用值这个方法去掉input在Chrome浏览器上的黄色背景:(普通html也可以用)

input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
    						box-shadow: 0 0 0px 1000px white inset !important;
					}

二、普通html标签要去掉自动填充,可以直接在标签上添加属性:
利用H5新增属性 autocomplete=“off”,直接关闭自动填充。【浏览器机制】

如果还有其他方法,希望留言

猜你喜欢

转载自blog.csdn.net/weixin_43392673/article/details/83828274