zoukankan      html  css  js  c++  java
  • artDialog的使用

    用法一:github上下载包:https://github.com/aui/artDialog
                   seajs方法使用
                   <!doctype html>
    <html lang="zh">
    <head>
        <meta charset="UTF-8">
        <title>test</title>
        <style>
        body {
            *margin: 0;
            *padding: 0;
        }
        </style>
    </head>
    <body>
    <button data-event="test">open dialog</button>
    <script src="../lib/sea.js"></script>
    <script>
    seajs.config({
      alias: {
        "jquery": "jquery-1.10.2.js" //jquery路径
      }
    });
    seajs.use(['jquery', '../src/dialog-plus'], function ($, dialog) {
        $('button[data-event=test]').on('click', function () {
            var d = dialog({
                title: '消息',
                content: '风吹起的青色衣衫,夕阳里的温暖容颜,你比以前更加美丽,像盛开的花<br>——许巍《难忘的一天》',
                okValue: '确 定',
                ok: function () {
                    var that = this;
                    setTimeout(function () {
                        that.title('提交中..');
     
                    }, 2000);
                    return false;
                },
                cancelValue: '取消',
                cancel: function () {}
            });
           // d.show();
            d.showModal();//有遮罩层效果
        });
    });
    </script>
    </body>
              </html>
    

      

     
    用法二:下载artDialog插件包   但是没有d.showModal()
    引入js  css使用
      
       <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <link rel="stylesheet" type="text/css" href="../artDialog/skins/idialog.css">
        <script type="text/javascript" src='../artDialog/artDialog.js'></script>
    </head>
    <body>
        <script type="text/javascript">
                var d = art.dialog({
                   title: '提示信息',
                content: '风吹起的青色衣衫,夕阳里的温暖容颜,你比以前更加美丽,像盛开的花<br>——许巍《难忘的一天》',
                okValue: '确 定',
                ok: function () {
                    var that = this;
                    setTimeout(function () {
                        that.title('提交中..');
                    }, 2000);
                    return false;
                },
                cancelValue: '取消',
                cancel: function () {}
                });
                 d.show();
                //d.showModal();//报错
        </script>;
    </body>
    </html>
    

      

     
  • 相关阅读:
    Door Frames CodeForces
    POJ 3090 Visible Lattice Points (ZOJ 2777)
    从斐波那契到矩阵快速幂
    Recursive sequence (矩阵快速幂)2016ACM/ICPC亚洲区沈阳站
    c++ 类实现 AVL树容器(包含迭代器)
    c++ 链表类的实现(包含迭代器)
    HDU
    【几何+模拟】二次元变换 计蒜客
    【bfs+链式向前星】防御僵尸(defend)计蒜客
    deque in Python
  • 原文地址:https://www.cnblogs.com/lhy-93/p/5741628.html
Copyright © 2011-2022 走看看