1 方法一:
2
3 在弹出dialog的时候不用$('#dialogDiv').dialog('open');打开。用$('#dialogDiv').window('open');打开。再用window的resize方法重新布局就可以了。
4 类似:
5 var top = $("#struBtn").offset().top + 30;
6 var left = $("#struBtn").offset().left;
7 $('#dialogDiv').window('open').window('resize',{width:'250px',height:'500px',top: top,left:left});
8
9
10
11 方法二:
12
13 dialog有两个属性left和top,你可以用他们控制dialog初始的页面所在位置用法跟title等属性一样
14 $('#dlg').dialog({undefined
15 title: FullBdName + '->' + RoomName + '→详情',
16 width: 935,
17 height: 500,
18 closed: false,
19 cache: false,
20 collapsible: true,
21 maximizable: true,
22 resizable: true,
23 shadow: true,
24 left: 150,
25 top:50,
26 //href: '/ShowData.aspx?RoomID=' + rowIndex,
27 modal: true,
28 content: ''
29 });