JS Function Bullet Box Package

Source: Internet
Author: User

function hint box function messageBox (option) {var html = '; HTML + = ' <div class= "message-box-head" > ' + option.title;html + = ' <i class= "icon iconfont message-close" ></i></div> "if (option.type = = ' using ') {html + = ' <div C lass= "Message-box-body" > "html + = ' <p class=" message-prompt "> ' + option.content + ' </p> '; html + = ' </ Div> ';} else if (Option.type = = ' disable ') {html + = ' <div class= ' message-box-body ' > '; HTML + = ' <p class= ' message-prompt ' > ' + option.content + ' </p> '; html + = ' </div> ';} else if (Option.type = = ' confirm ') {html + = ' <div class= ' message-box-body reset-pwd ' > '; HTML + = ' <p class= ' Messa Ge-prompt ">" + option.content + ' </p> '; html + = ' <div class= "message-btn por" > '; HTML + = ' <button class= ' Btn-common btn-gray cancel-btn PoA "> Cancel </button>"; HTML + = ' <button class= "Btn-common btn-blue yes-btn PoA" > OK </button> '; html + = ' </div> '; html + = ' </div> ';} else if (OptiOn.type = = ' Confirm2 ') {html + = ' <div class= ' message-box-body confirm-spec ' > '; HTML + = ' <div class= ' Message-prom PT ">"; HTML + = ' <p> ' + option.contenttitle + ' </p> '; html + = ' <p> ' + option.content + ' </p> '; HTML + = ' </div> '; html + = ' <div class= "message-btn por" > '; HTML + = ' <button class= ' Btn-common btn-gray CANCEL-BTN PoA "> Cancel </button>"; HTML + = ' <button class= "Btn-common btn-blue yes-btn PoA" > OK </button > '; HTML + = ' </div> '; html + = ' </div> ';} $ (". Message-box-main"). Empty (). append (HTML); $ (". Message-box"). AddClass (' show ');//Click Cancel Event $ (". Cancel-btn"). Click ( Function () {$ (". Message-box"). Removeclass (' show '); if (option.cancel) {option.cancel ();}}); /Click OK event $ (". Yes-btn"). Click (function () {$ (". Message-box"). Removeclass (' show '); if (Option.surefun) {Option.surefun ( );}});/ /Click the icon to cancel the event $ (". Message-close"). Click (function () {$ (". Message-box"). Removeclass (' show '); if (Option.callback) { Option.callback ();}});}

  

  

JS Function Bullet Box Package

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.