We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this code var pass = prompt("Please enter your password:", "");
var pass = prompt("Please enter your password:", "");
I want to make this prompt through Sweet Alert and save it in variable pass. So far I have done this but I don't know how to save it in a variable.
swal({ content: { element: "input", attributes: { placeholder: "Type your password", type: "password", }, }, });
The text was updated successfully, but these errors were encountered:
The type input or prompt are the same, and to retrieve the input value, check this example:
swal({ title: "An input!", text: "Write something interesting:", type: "input", showCancelButton: true, closeOnConfirm: false, 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"); });
Sorry, something went wrong.
No branches or pull requests
I have this code
var pass = prompt("Please enter your password:", "");
I want to make this prompt through Sweet Alert and save it in variable pass. So far I have done this but I don't know how to save it in a variable.
swal({ content: { element: "input", attributes: { placeholder: "Type your password", type: "password", }, }, });
The text was updated successfully, but these errors were encountered: