zoukankan      html  css  js  c++  java
  • jquery.ui.dialog

    //提示框
        var w = width || 300;
        var h = height || 200;
        var alertdiv = $("<div title='提示'></div>").appendTo($("BODY"));
        var content = alertdiv.text(msg);
        alertdiv.dialog({
            autoOpen: true,
            height: h,
             w,
            modal: true,
            resizable: false,
            bgiframe: true,
            close: function (evt, ui) {
                alertdiv.dialog("destroy");
                alertdiv.html("").remove();
            },
            buttons:
            {
                "确定": function () {
                    if (okClickHanler && $.isFunction(okClickHanler)) {
                        okClickHanler()
                    }
                    alertdiv.dialog("close");
                }
            }
        });
    }
     //确认对话框
    function confirmDialog(msg, title, okClickHanler, cancelClickHandler, width, height) {
        var w = width || 300;
        var h = height || 200;
        var confirmdiv = $("<div title='" + (title ? title : "确认") + "'></div>").appendTo($("BODY"));
        var content = confirmdiv.text(msg);
        confirmdiv.dialog({
            autoOpen: true,
            height: h,
             w,
            modal: true,
            resizable: false,
            bgiframe: true,
            close: function (evt, ui) {
                confirmdiv.dialog("destroy");
                confirmdiv.html("").remove();
            },
            buttons:
            {
                "确定": function () {
                    if (okClickHanler && $.isFunction(okClickHanler)) {
                        okClickHanler()
                    }
                    confirmdiv.dialog("close");
                },
                "取消": function () {
                    if (cancelClickHandler && $.isFunction(cancelClickHandler)) {
                        cancelClickHandler()
                    }
                    confirmdiv.dialog("close");
                }
            }
        });
    }
    //用Dialog加载页面
            {
                var div=$("<div id='div_Info' title='信息统计'></div>").appendTo($("BODY"));
                var content=div.load(url,{});
                $("#div_Info").data("url",url);
                div.dialog({
                    autoOpen:true,
                    800,
                    height:550,
                    modal:true,
                    resizable:false,
                    bgiframe:true,
                    close:function(evt,ui)
                    {
                         div.dialog("destroy");
                         div.html("").remove();
                    }
                });
            }
  • 相关阅读:
    ARM 浮点运算
    手机微硬盘读取速度>50MB/s eMMC技术浅析
    Chrome 浏览器跨域和安全访问问题 使用 chrome的命令行标记:disable-web-security 参数联调线上数据
    Vue学习手札
    使用MouseWithoutBordersSetup共享鼠标键盘教程
    java使用POI获取sheet、行数、列数
    基于Spring MVC实现基于form表单上传Excel文件,批量导入数据
    org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML.
    [MYSQL]时间毫秒数转换
    springmvc 传递和接收数组参数
  • 原文地址:https://www.cnblogs.com/luowei/p/2719163.html
Copyright © 2011-2022 走看看