how to make password textbox value visible when hover an icon

前端 未结 11 1276
误落风尘
误落风尘 2021-01-31 03:01

Good day all,

I have a form that has a password field:


Naturally, the i

11条回答
  •  渐次进展
    2021-01-31 03:47

    a rapid response not tested on several brosers, works on gg chrome / win

    -> On focus event -> show/hide password

    
    

    script jQuery

    // show on focus
    $('input[type="password"]').on('focusin', function(){
    
        $(this).attr('type', 'text');
    
    });
    // hide on focus Out
    $('input[type="password"]').on('focusout', function(){
    
        $(this).attr('type', 'password');
    
    });
    

提交回复
热议问题