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');
     }
 }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM