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