您的位置:首页 > 其它

解决chrome input 黄色背景色的问题

2013-05-31 18:13 295 查看
不需要关闭autocomplete的情况下通过js完美解决.

<script>

if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {

$(window).load(function(){
$('input:-webkit-autofill').each(function(){
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
});
});
}
</script>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: