HTML
CSS
JavaScript
play_arrow
HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>对话框 - mdui.configm()</title>
  <link rel="stylesheet" href="../assets/mdui-v0.4.3/css/mdui.min.css"/>
</head>
<body class="mdui-theme-primary-indigo mdui-theme-accent-pink">

<div class="mdui-container">
  <button class="mdui-btn mdui-color-theme-accent mdui-ripple" id="example-confirm-1">demo1</button>
  <button class="mdui-btn mdui-color-theme-accent mdui-ripple" id="example-confirm-2">demo2</button>
  <button class="mdui-btn mdui-color-theme-accent mdui-ripple" id="example-confirm-3">demo3</button>
  <button class="mdui-btn mdui-color-theme-accent mdui-ripple" id="example-confirm-4">demo4</button>
</div>

<script src="../assets/mdui-v0.4.3/js/mdui.min.js"></script>
</body>
</html>
CSS

    
JavaScript
mdui.JQ('#example-confirm-1').on('click', function(){
  mdui.confirm('content', function(){
    mdui.alert('点击了确认按钮');
  });
});
mdui.JQ('#example-confirm-2').on('click', function(){
  mdui.confirm('content',
    function(){
      mdui.alert('点击了确认按钮');
    },
    function(){
      mdui.alert('点击了取消按钮');
    }
  );
});
mdui.JQ('#example-confirm-3').on('click', function(){
  mdui.confirm('content', 'title', function(){
    mdui.alert('点击了确认按钮');
  });
});
mdui.JQ('#example-confirm-4').on('click', function(){
  mdui.confirm('content', 'title',
    function(){
      mdui.alert('点击了确认按钮');
    },
    function(){
      mdui.alert('点击了取消按钮');
    }
  );
});