繁体   English   中英

如何在弹出对话框中更改jquery ui对话框宽度?

[英]How to change jquery ui dialog width inside the popup dialog itself?

在一个ASP.Net网页中,我创建了一个div和一个iFrame来弹出另一个页面,我想要做的是从对话框内部的一个按钮调整对话框宽度...

可能吗? 谢谢...

是的,要从iframe中选择iframe以外的内容,请使用以下命令:

 $("#WhateverIWantOutsideIframe", window.parent.document);

所以从iframe中做到这一点

$('#InsideButton').on('click',function(){
   $("#DialogOutsideIframe", window.parent.document).width(9000);
});
var dlgContainer = $('#container');

dlgContainer.dialog({
.
.
open : function(){
    dlgContainer.find('#width-change-button').on('click' , function(){ 
        dialogBox.closest('.ui-dialog').css('width', '700px'); //or use .width()
    });
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM