how to make password textbox value visible when hover an icon

前端 未结 11 1072
误落风尘
误落风尘 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:49

    Try This :

    In HTML and JS :

    // Convert Password Field To Text On Hover.
      var passField = $('input[type=password]');
      $('.show-pass').hover(function() {
          passField.attr('type', 'text');
      }, function() {
        passField.attr('type', 'password');
      })
    
    
    
    
          

提交回复
热议问题