首页 > 代码库 > JQueryUI确认框 confirm

JQueryUI确认框 confirm

$(function(){    $(‘#AlertMsg‘).dialog({      autoOpen: false,      width: 300,      modal: true,      position: ‘center‘,      buttons: {          "确定": function() {                    $(this).dialog("close");                  }      }   });      $(‘#ConfirmMsg‘).dialog({          autoOpen: false,          width: 300,          modal: true,          position: ‘center‘,          buttons: {              "确定": function() {                           mDialogCallback(true);                           $(this).dialog(‘close‘);                                                 },              "取消": function() {                                                      mDialogCallback(false);                           $(this).dialog(‘close‘);                      }                        }   });});var mDialogCallback;function ShowMsg(msg, callback) {     if (callback == null) {         $(‘#AlertMsgBody‘).html(msg);         $(‘#AlertMsg‘).dialog(‘open‘);     }     else {         mDialogCallback = callback;         $(‘#ConfirmMsgBody‘).html(msg);         $(‘#ConfirmMsg‘).dialog(‘open‘);     } }

 

JQueryUI确认框 confirm