Sweetalert: 实施密码提示

创建于 2015-03-19  ·  5评论  ·  资料来源: t4t5/sweetalert

#5 的后续行动

最有用的评论

这在 0.5.0 版本中关闭,更改 inputType:

  $('button.delete-account').click(function(e) {
    swal({
      title: "Are you sure you want to delete your account?", 
      text: "If you are sure, type in your password:", 
      type: "input",
      inputType: "password",
      showCancelButton: true,
      closeOnConfirm: false
    }, function(typedPassword) {
      console.log(typedPassword);
    });
  });

所有5条评论

这在 0.5.0 版本中关闭,更改 inputType:

  $('button.delete-account').click(function(e) {
    swal({
      title: "Are you sure you want to delete your account?", 
      text: "If you are sure, type in your password:", 
      type: "input",
      inputType: "password",
      showCancelButton: true,
      closeOnConfirm: false
    }, function(typedPassword) {
      console.log(typedPassword);
    });
  });

正如@parterburn所说,只需使用inputType就可以了! 此外,如果您不确定如何使用输入功能,请随时查看SweetAlert 教程

感谢您的指点,并为噪音感到抱歉:)

这是一个有效的解决方案! 谢谢 :)

它有效👍

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

Untit1ed picture Untit1ed  ·  5评论

daftspunk picture daftspunk  ·  4评论

yrshaikh picture yrshaikh  ·  4评论

Lusitaniae picture Lusitaniae  ·  4评论

VoxelNaut picture VoxelNaut  ·  6评论