📜  显示密码 fa-eye javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:17.056000             🧑  作者: Mango

代码示例1
$("body").on('click', '.toggle-password', function() {
  $(this).toggleClass("fa-eye fa-eye-slash");
  var input = $("#pass_log_id");
  if (input.attr("type") === "password") {
    input.attr("type", "text");
  } else {
    input.attr("type", "password");
  }

});