1         if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
2             $(window).load(function () {
3                 $('input:-webkit-autofill').each(function () {
4                     var text = $(this).val(); var name = $(this).attr('name');
5                     $(this).after(this.outerHTML).remove();
6                     $('input[name=' + name + ']').val(text);
7                 });
8             });
9         }

 自动填充原理,找到input标签type类型为password的对象,识别该对象为密码框,查找密码框上面的第一个type为text的input对象为登录名框。

相关文章:

  • 2021-10-09
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2021-07-05
  • 2021-12-19
  • 2021-05-18
猜你喜欢
  • 2022-12-23
  • 2022-03-15
  • 2022-12-23
  • 2021-11-23
  • 2021-05-28
  • 2021-11-29
相关资源
相似解决方案