3

这是我当前的代码:

$("#DialogScroll").dialog({
                bgiframe: true,
                autoOpen: false,
                maxHeight: 600,
                width: 550,
                modal: true,
                resizable: false,
                open: function (type, data) {
                    $(this).parent().appendTo("form");
                },
                close: function () { }
            });

maxHeight 在 Firefox、Chrome 等中效果很好,正如预期的那样,但 IE 7 显然存在问题。有谁知道如何让 UI 对话框在 IE 中使用 maxHeight?

<div id="DialogScroll" class="dialog" style="display:none; ">
        <table>
            <thead>
                <tr>
                    <th>
                        State Code
                    </th>
                    <th>
                        State Name
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Literal ID="litStates" runat="server" />
            </tbody>
        </table>
    </div>
4

2 回答 2

5

看起来这是一个长期存在的开放 jQueryUI 错误- 在这个链接上有一个解决方法和评论中列出的补丁。

于 2010-12-22T14:11:41.883 回答
3

Dean 指向的链接最近更新了一个对我有用的解决方法:

此外,您可以通过 'vol7ron' 应用自己的 CSS;就像是:

$('#dialog')
   .dialog( { modal : true } )
   .css( { 'max-height' : '50px' } );

因此,在您的情况下:

$("#DialogScroll").dialog({
    bgiframe: true,
    autoOpen: false,
    width: 550,
    modal: true,
    resizable: false,
    open: function (type, data) {
        $(this).parent().appendTo("form");
    },
    close: function () { }
}).css( { 'max-height' : '600px'} );
于 2012-10-04T19:27:24.973 回答