Amaze UI 程序员开发必备

刚接手Amaze UI 多多交流,相互帮助,谢谢支持,么么哒!spa

1.关于Amaze JS插件中,基本的alert的几种常见用法插件

1.基本Alert形式调用code

<div class="am-alert">
 个人愿望是世界和平!
</div>

2.自带js插件关闭按钮blog

<div class="am-alert" data-am-alert>
  <button type="button" class="am-close">&times;</button>
  <p>个人愿望是世界和平!</p>
</div>

3.根据修改能够调整不一样的背景颜色,success,warning,danger,secondary等ip

<div class="am-alert am-alert-success" data-am-alert>
  <button type="button" class="am-close">&times;</button>
  <p>个人愿望是世界和平!</p>
</div>

4.多内容,颜色同样的能够调整io

<div class="am-alert" data-am-alert>
  <button type="button" class="am-close">&times;</button>
  <h3>共同渡过</h3>
  <p>《共同渡过》是张国荣1987年发行的专辑《Summer Romance》中的一首歌。</p>
  <ul>
    <li>若我可再活多一次都盼</li>
    <li>再能够在路途重逢着你</li>
    <li>共去写一辈子的句子</li>
    <li>若我可再活多一次千次</li>
    <li>我都盼面前还是你</li>
    <li>我要他生都有此生的暖意</li>
  </ul>
</div>

 

js控制实例function

<div class="am-alert" id="your-alert">
  <button type="button" class="am-close">&times;</button>
  <p>在应用 JS 激活以前这个警告框是没法关闭的。</p>
</div>
<button type="button" class="am-btn am-btn-danger" id="doc-alert-btn-bind">点击激活上面 Alert 的关闭功能</button>
<script>
  $(function() {
    $('#doc-alert-btn-bind').one('click', function() {
      $('#your-alert').alert();
      alert('已激活,点击上的 X 试试!');
    });
  });
</script>
相关文章
相关标签/搜索