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();
                    }
                });
            }
  • 相关阅读:
    网络基础
    关于actionscript中新建一个sprite,设置大小(宽高)的问题。
    Android SDK无法更新问题解决 ---- 还可解决无法上google的问题
    android apk简单反编译
    Flash的坑之ExternalInterface.call只返回null值的解决办法
    Flash Socket简单调试工具
    进制转换 正进制
    Codeforces Div3 #498 A-F
    UVa10082
    div与div之间的拖拽
  • 原文地址:https://www.cnblogs.com/luowei/p/2719163.html
Copyright © 2011-2022 走看看