Very beautiful SweetAlert. js pop-up layer. The input box is displayed in the sweetalert pop-up window.

Source: Internet
Author: User

Very beautiful SweetAlert. js pop-up layer. The input box is displayed in the sweetalert pop-up window.
Online instance

Instance demo

Usage
  1. 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

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.