解決360瀏覽器自動填充的屎黃色背景的問題


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對象為登錄名框。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM