jquery dlialog 页面对话窗口示例

来源:互联网 发布:会计核算软件说明书 编辑:程序博客网 时间:2024/05/01 08:09
 $('#btnChooseGroup').click(function () {
                var Url = "SelectUserGroup.aspx";
                var Width = "755px";
                var Height = "400px";
                if (typeof updialog == 'undefined' || !updialog) {
                    $('<iframe frameborder="no">')
                    .attr({ "src": Url, "scrolling": "yes", "id": "showupload" })
                    .css({ "width": Width, "height": Height })
                    .appendTo(
                        updialog = $("<div>").css({ "height": "460px", "width": "765px", "padding": "0x", "position": "relative", "overflow": "hidden" })
                        .attr({ "id": "ifrdiv" })
                        .dialog({
                            width: 765,
                            height: 460,
                            modal: true,
                            title: "选择用户组",
                            draggable: true,
                            resizable: false,
                            close: function () {
                                var strIds = $("iframe").contents().find("#groupids").val();
                                var strNames = $("iframe").contents().find("#groupnames").val();
                                $('#<%=hidIds.ClientID %>').val(strIds);
                                $('#<%=hidNames.ClientID %>').val(strNames);
                                $('#<%= divProgramNameList.ClientID%>').html(strNames.substring(0, strNames.length - 1));
                            }
                        })
                    );
                } else {
                    updialog.dialog("open");
                }
            });
0 0
原创粉丝点击