Very beautiful SweetAlert. js pop-up layer. The input box is displayed in the sweetalert pop-up window.
Online instance
Instance demo
Usage
- Swal ("Here's a message! ")
Detailed description of copy Parameters
Parameters |
Default Value |
Description |
Title |
Null (required) |
Window name. The object can be passed through the "title" attribute or the first parameter. |
Text |
Null |
Window description. It can be passed through the "text" attribute of the object or the second parameter. |
Type |
Null |
Window Type. SweetAlert has four types of icon animations: "warning", "error", "success", and "info". It can be placed in the "type" array or passed through the third parameter. |
AllowOutsideClick |
False |
If it is set to "true", you can close the warning box by clicking a region other than the warning box. |
ShowCancelButton |
False |
If it is set to "true", the "cancel" button is displayed. Click to close the warning box. |
ConfirmButtonText |
"OK" |
This parameter is used to change the text on the confirmation button. If it is set to "true", the OK button will automatically Replace "Confirm" with "OK ". |
ConfirmButtonColor |
"# AEDEF4" |
This parameter is used to change the background color of the confirmation button (must be a HEX value ). |
CancelButtonText |
"Cancel" |
This parameter is used to change the text of the cancel button. |
CloseOnConfirm |
True |
If you want to retain the modal window after clicking the OK button, set it to "false ". This parameter is useful when other SweetAlert trigger confirmation button events. |
ImageUrl |
Null |
Add a custom image to the warning box. Must be the complete path of the image. |
ImageSize |
"80x80" |
After setting the image path, you can set the image size in the format of "x" in the middle of two numbers. |
Timer |
Null |
The time when the alarm box is automatically closed. The Unit is ms. |
Download