我想要jQuery ui对话框's宽度可根据内容进行调整,但自动宽度功能在IE9中不起作用,

i want to jQuery ui dialog's width to be adjusted according to content, But auto-width feature wont work in IE9 ,

本文关键字:调整 不起作用 IE9 功能 对话框 ui jQuery 我想要      更新时间:2023-09-26

1.显示jQuery对话框的代码

function onSucess(result) {
        result = result.substring(result.indexOf("<"), result.length);
        $("#div1").html(result);
        $('#div1').dialog({
            modal: true,
            height: 'auto',
            width:'auto',
            buttons: {
                "Ok": function () {
                    $(this).dialog("close");
                }
            }
        });
 }

如您所见,高度和宽度都设置为自动模式

尝试width:"100%"而不是width:"auto"。同样的高度。