Global Settings:
JavaScript code:
// set the text in the button, the default is-ok/cancel, you can set any text, such as now-confirm/Cancel $.messager.defaults = { ' confirmation ' , ' Cancel ' ,}
The first type:
Effect:
HTML code:
No
JavaScript code:
// The first type: Warning window, the simplest one // The parameters are: Title, content, internal icon, click the button to execute the event $.messager.alert (' warning window ' message content! 'info', function () { alert (" You clicked the button! ");});
The second type:
Effect:
HTML code:
No
JavaScript code:
//Second type: confirmation message window//The parameters are: Title, content, click the button to execute the event (flag: parameter, value is TRUE or False,true is Ok,false is cancel)$.messager.confirm ('Confirmation message Box','Content Area', function (flag) {if(flag) {alert ("you clicked on the confirmation! "); } Else{alert ("the one you clicked is Cancel! "); }});
The third type:
Effect:
HTML code:
No
JavaScript code:
// Third type: Message form with text box // The parameters are: Title, content, callback function $.messager.prompt (' lock screen ' Please enter the password!) ', function (content) { if123) { alert (" input is correct, entering ... ... " ); }});
The fourth type:
Effect:
- Do not use any parameters.
HTML code:
No
JavaScript code:
$.messager.progress ();
Effect:
HTML code:
No.
JavaScript code:
$.messager.progress ({ ' hint ', ' entering, please wait a moment .... ', interval:+,});
- Because there is no close button, use code to close.
$.messager.progress ('close');
The fifth type:
The lower right corner shows:
Effect:
HTML code:
No
JavaScript code:
$.messager.show ({ ' bottom right message box ', ' content display ' , #,//2 seconds 'slide' ,//null,slide,fade,show});
Top display:
Effect:
HTML code:
No
JavaScript code:
$.messager.show ({title: " bottom right message box " , msg: ' , // null,slide,fade,show Span style= "color: #000000;" > style: { // show top at the top: 0
Easyui-messager message box