Alonejs.msgbox ()--Popup message box

Source: Internet
Author: User

First, reference

<Linkhref= "Http://alonejs.suziyun.com/alonejs.min.css"rel= "stylesheet" /><Scriptsrc= "Https://code.jquery.com/jquery-3.1.0.min.js"></Script><Scriptsrc= "Http://alonejs.suziyun.com/alonejs.min.js"></Script>

Second, the invocation example

1. Pop Up the basic message box:

Ibox.msgbox (" Hello!  "," system prompt ");

2. Pop-up modal message box:

Ibox.msgbox (" Hello!   "System prompt ", {    true});

3. The modal message box with the OK and Cancel buttons is ejected, and the width bit is set to 200px:

Ibox.msgbox (" Hello!   " system prompt ", Function (e) {    alert (" OK " } , function (e) {    alert (" cancel ");}, {      ,    true});

4, click "Cancel" button, do not let the message box closed:

Ibox.msgbox ("Hi there! ","System Tips", Function (e) {alert ("Determine"}, Function (e) {alert ("Cancel"); return false;//returns false to keep the message box from closing, and the OK button is also supported. }, {width: $, modal:true});

5. Execute custom logic when the message box is closed:

Ibox.msgbox ("Hi there! ","System Tips", Function (e) {alert ("Determine"}, Function (e) {alert ("Cancel"); return false;//returns false to not let the message box close}, {width: $, modal:true, Fnclose:function (e) {alert ("Close"); //Return false;//If this returns false, the same will prevent the message box from closing    }});

6, let the message box pop-up after a specified time after the automatic shutdown, the upper-right corner of the "X" Close button, and the "OK" and "Cancel" buttons are not displayed:

Ibox.msgbox ("Hi there! ","System Tips", Function (e) {alert ("Determine"}, Function (e) {alert ("Cancel"); return false;//returns false to not let the message box close}, {width: $, modal:true, Fnclose:function (e) {alert ("Close"); }, AutoClose: - //specifying a autoclose of 1200 milliseconds allows the message box to be automatically closed after 1200 milliseconds, and the Fnclose event will also be triggered when it is closed. });

Alonejs.msgbox ()--Popup message box

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.