首页 > Web开发 > 详细

JQueryUI确认框 confirm

时间:2016-11-07 16:00:33      阅读:255      评论:0      收藏:0      [点我收藏+]
$(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

原文:http://www.cnblogs.com/tiancai/p/6039226.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!