0

我有一个 JQuery 弹出窗口,我编写了如下脚本。

<style>
    .ui-widget-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #000;
        opacity: 0.7;
        z-index: 0;
    }

</style>

var wWidth = $(window).width();
        var dWidth = wWidth * 0.85;
        var wHeight = $(window).height();
        var dHeight = wHeight * 0.85;
        $('#QualifyLead').dialog({
            autoOpen: false,
            draggable: false,
            resizable: false,
            bgiframe: false,
            modal: true,
            width: dWidth,
            height: dHeight,
            closeOnEscape: false,
            title: "Enter Qualify Lead Information",
            open: function (type, data) {
                $(this).parent().appendTo("form");
            }
        });

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) {
        var wWidth = $(window).width();
        var dWidth = wWidth * 0.85;
        var wHeight = $(window).height();
        var dHeight = wHeight * 0.85;
        $('#QualifyLead').dialog({
            autoOpen: false,
            draggable: false,
            resizable: false,
            bgiframe: false,
            modal: true,
            width: dWidth,
            height: dHeight,
            closeOnEscape: false,
            title: "Enter Qualify Lead Information",
            open: function (type, data) {
                $(this).parent().appendTo("form");
            }
        });
    });

这有一个问题。当我的网格中有很多记录时(单击网格按钮打开弹出窗口),我必须滚动才能看到最后一行。当我单击最后一行的按钮时,弹出窗口不适合窗口的高度。您可以查看随附的屏幕截图。

JQuery中的弹出问题

我错过了什么?

4

1 回答 1

0

代替:

var wHeight = $(window).height();

尝试这个:

var wHeight = $(window).css("height");
于 2013-10-15T06:20:38.357 回答