1、密码输入框

<input class="oaInput oaText" type="text" placeholder="请输入用户名"/>
<input class="oaInput oaPwd" type="text" placeholder="请输入密码"/>

2、默认前台显示如下

<input class="oaInput oaPwd" type="password" placeholder="请输入密码"/>

状态下:

js监听密码输入框type

加入js控制如下:

$('.oaPwd').bind('input propertychange',function(){
          if($(".oaPwd").val()==''){
              $('.oaPwd')[0].type="text";
          }else{
              $('.oaPwd')[0].type="password";
          }
      })
<input class="oaInput oaPwd" type="text" placeholder="请输入密码"/>

js监听密码输入框type

相关文章:

  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-17
猜你喜欢
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
相关资源
相似解决方案