主頁(yè) > 知識(shí)庫(kù) > AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼

AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼

熱門(mén)標(biāo)簽:只辦理400電話 機(jī)器人外呼系統(tǒng)存在哪些能力 平?jīng)龅貓D標(biāo)注位置怎么弄 拓展地圖標(biāo)注 高德地圖標(biāo)注地點(diǎn)糾錯(cuò) 電話機(jī)器人黑斑馬免費(fèi) 南昌仁和怎么申請(qǐng)開(kāi)通400電話 如何獲取地圖標(biāo)注客戶 電話機(jī)器人電銷系統(tǒng)掙話費(fèi)

實(shí)現(xiàn)代碼如下所示:

<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>模態(tài)窗口</title>
<link rel="stylesheet" href="assets/css/amazeui.min.css">
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="assets/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="assets/ie8/jquery.min.js"></script>
<script src="assets/ie8/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="assets/js/amazeui.min.js"></script>
</head>
<body style="margin: 50px;">
<!--基本形式-->
<button
  type="button"
  class="am-btn am-btn-primary"
  data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 400, height: 225}">
  Modal
</button>
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Modal 標(biāo)題
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
    <div class="am-modal-bd">
      Modal 內(nèi)容。本 Modal 無(wú)法通過(guò)遮罩層關(guān)閉。
    </div>
  </div>
</div>
<!--模擬 Alert-->
<button
  type="button"
  class="am-btn am-btn-primary"
  data-am-modal="{target: '#my-alert'}">
  Alert
</button>
<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Amaze UI</div>
    <div class="am-modal-bd">
      Hello world!
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn">確定</span>
    </div>
  </div>
</div>
<!--模擬 Confirm-->
<button
  type="button"
  class="am-btn am-btn-warning"
  id="doc-confirm-toggle">
  Confirm
</button>
<ul class="am-list confirm-list" id="doc-modal-list">
  <li><a data-id="1" href="#">每個(gè)人都有一道傷口, 或深或淺,蓋上布,以為不存在。</a><i class="am-icon-close"></i></li>
</ul>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Amaze UI</div>
    <div class="am-modal-bd">
      你,確定要?jiǎng)h除這條記錄嗎?
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
      <span class="am-modal-btn" data-am-modal-confirm>確定</span>
    </div>
  </div>
</div>
<script>
$(function() {
  $('#doc-modal-list').find('.am-icon-close').add('#doc-confirm-toggle').
    on('click', function() {
      $('#my-confirm').modal({
        relatedTarget: this,
        onConfirm: function(options) {
          var $link = $(this.relatedTarget).prev('a');
          var msg = $link.length ? '你要?jiǎng)h除的鏈接 ID 為 ' + $link.data('id') :
            '確定了,但不知道要整哪樣';
          alert(msg);
        },
        // closeOnConfirm: false,
        onCancel: function() {
          alert('算求,不弄了');
        }
      });
    });
});
</script>
<!--模擬 Prompt-->
<button
  type="button"
  class="am-btn am-btn-success"
  id="doc-prompt-toggle">
  Prompt
</button>
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">Amaze UI</div>
    <div class="am-modal-bd">
      來(lái)來(lái)來(lái),吐槽點(diǎn)啥吧
      <input type="text" class="am-modal-prompt-input">
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" data-am-modal-cancel>取消</span>
      <span class="am-modal-btn" data-am-modal-confirm>提交</span>
    </div>
  </div>
</div>
<script>
$(function() {
  $('#doc-prompt-toggle').on('click', function() {
    $('#my-prompt').modal({
      relatedTarget: this,
      onConfirm: function(e) {
        alert('你輸入的是:' + e.data || '')
      },
      onCancel: function(e) {
        alert('不想說(shuō)!');
      }
    });
  });
});
</script>
<!--Modal Loading-->
<button
  type="button"
  class="am-btn am-btn-success"
  data-am-modal="{target: '#my-modal-loading'}">
  Modal Loading
</button>
 
<div class="am-modal am-modal-loading am-modal-no-btn" tabindex="-1" id="my-modal-loading">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">正在載入...</div>
    <div class="am-modal-bd">
      <span class="am-icon-spinner am-icon-spin"></span>
    </div>
  </div>
</div>
<!--Actions-->
<button
  type="button"
  class="am-btn am-btn-secondary"
  data-am-modal="{target: '#my-actions'}">
  Actions
</button>
<div class="am-modal-actions" id="my-actions">
  <div class="am-modal-actions-group">
    <ul class="am-list">
      <li class="am-modal-actions-header">提示信息</li>
      <li><a href="#"><span class="am-icon-wechat"></span>微信</a></li>
      <li class="am-modal-actions-danger">
        <a href="#"><i class="am-icon-twitter"></i>twitter</a>
      </li>
    </ul>
  </div>
  <div class="am-modal-actions-group">
    <button class="am-btn am-btn-secondary am-btn-block" data-am-modal-close>取消</button>
  </div>
</div>
<!--Popup-->
<button
  type="button"
  class="am-btn am-btn-danger"
  data-am-modal="{target: '#my-popup'}">
  Popup
</button>
<div class="am-popup" id="my-popup">
  <div class="am-popup-inner">
    <div class="am-popup-hd">
      <h4 class="am-popup-title">...</h4>
      <span data-am-modal-close
            class="am-close">&times;</span>
    </div>
    <div class="am-popup-bd">
      ...
    </div>
  </div>
</div>
</body>
</html>

效果圖:

總結(jié)

到此這篇關(guān)于AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼的文章就介紹到這了,更多相關(guān)AmazeUI 模態(tài)窗口內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!

標(biāo)簽:西藏 漯河 青島 棗莊 池州 永州 遼源 新疆

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼》,本文關(guān)鍵詞  AmazeUI,模態(tài),窗口,的,實(shí)現(xiàn),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于AmazeUI 模態(tài)窗口的實(shí)現(xiàn)代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章