Detecting Browser Autofill

前端 未结 29 2035
天涯浪人
天涯浪人 2020-11-22 06:15

How do you tell if a browser has auto filled a text-box? Especially with username & password boxes that autofill around page load.

My first question is when does

29条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 06:46

    This works for me in the latest Firefox, Chrome, and Edge:

    $('#email').on('blur input', function() {
        ....
    });
    

提交回复
热议问题