zoukankan      html  css  js  c++  java
  • 基于artDialog的扩展

    /*
    *
    * 引用此文件必须引用以下两个资源文件,并且还要引用jQuery
    * <link href="ui-dialog.css" rel="stylesheet" type="text/css"/>
    * <script type="text/javascript" src="dialog-plus-min.js"></script>
    *
    */
    var myDialog = {
        showTips: function(content, title, showTime, close, isModal) {
            title = title || "消息";
            isModal = isModal || true;
            var d = dialog({
                fixed: true,
                title: title,
                content: content,
                onclose: close
            });
    
            if (isModal) {
                d.showModal();
            }
            else {
                d.show();
            }
    
            if (showTime > 0) {
                setTimeout(function() { d.close().remove(); }, showTime);
            }
    
            return d;
        },
        openWindow: function(url, title, height, width, close, isModal) {
            height = height || 500;         
            width = width || 500;
            isModal = isModal || true;
    
            var iframe = $('<iframe/>', { src: url });
            iframe.css('width', width);
            iframe.css('height', height);
            var d = dialog({
                fixed: true,
                title: title,
                content: iframe,
                onclose: close
            });
    
            if (isModal) {
                d.showModal();
            }
            else {
                d.show();
            }
    
            return d;
        },
        openDialog: function(content, title, height, width, close, isModal) {
            title = title || "消息";
            height = height || 500;
            width = width || 500;
            isModal = isModal || true;
    
            var d = dialog({
                fixed: true,
                content: content,
                title: title,
                height: height,
                 width,
                onclose: close
            });
    
            if (isModal) {
                d.showModal();
            }
            else {
                d.show();
            }
            return d;
        },
        openConfirm: function(content, title, ok, cancel, close) {
            title = title || "消息";
    
            var d = dialog({
                fixed: true,
                title: title,
                content: content,
                okValue: '确定',
                ok: ok,
                cancelValue: '取消',
                cancel: cancel,
                onclose: close
            });
            d.showModal();
    
            return d;
        }
    }
  • 相关阅读:
    Http异常状态码解决方案。
    integer 面试题。
    int转换为String,常用的四种方法。
    Implicit super constructor Array() is undefined for default constructor. Must define an explicit constructor
    Eclipse的常用设置。
    构造方法详解。
    this关键字。
    面向对象--构造方法知识点。
    生成1-100之间的随机数。
    redis回顾
  • 原文地址:https://www.cnblogs.com/Jarvan-Chan/p/5991735.html
Copyright © 2011-2022 走看看