目前正在从事个人项目.我希望用户单击一个按钮,将显示SweetAlert提示,以便用户验证其凭据.但是,我在SweetAlert网站上看到的代码只允许一个输入字段.这是我的代码:
swal({
title: "Authenicating for continuation",
text: "Test",
type: "input",
showCancelButton: true,
closeOnConfirm: false,
animation: "slide-from-top",
inputPlaceholder: "Write something"
}, function(inputValue) {
if (inputValue === false) return false;
if (inputValue === "") {
swal.showInputError("You need to write something!");
return false
}
// swal("Nice!", "You wrote: " + inputValue, "success");
});
Run Code Online (Sandbox Code Playgroud)
那么,有没有办法可以获得两个输入字段?密码的一个输入字段和文本的另一个输入字段.
在laravel中,当一个新用户注册到我的网站时,他们使用的电子邮件已存在于数据库中.怎么能告诉用户电子邮件已经存在?我是laravel框架的新手.示例代码也不错.