easyui创建模式化窗口

来源:互联网 发布:雷蛇2000 mac驱动 编辑:程序博客网 时间:2024/05/17 23:16
/*
       创建一个模式化Dialog
       */
        var modalDialog = function (options) {
            //modalDialog.handler==undefined
            var opts = $.extend({
                id: '',
                title: ' ',
                width: 800,
                height: 500,
                modal: true,
                onClose: function () {
                    $(this).dialog('destroy');
                }
            }, options);
            opts.modal = true;// 强制此dialog为模式化,无视传递过来的modal参数
            if (options.url) {
                opts.content = '<iframe id="' + options.id + '" src="' + options.url + '" allowTransparency="true" scrolling="auto" width="100%" height="98%" frameBorder="0" name=""></iframe>';
            }
            return $('<div/>').dialog(opts);
        };
0 0