Easyui-messager message box

Source: Internet
Author: User

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 ();

    • Use parameters.

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

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.