#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 版本中关闭,更改 inputType: