- // Stop chrome's autocomplete from making your input fields that nasty yellow. Yuck.
- 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);
- });
- });
- }
- //该片段来自于http://www.codesnippet.cn/detail/190820135206.html
来源: http://www.codesnippet.cn/detail/190820135206.html