答案 0 :(得分:1)
Looking at the manual,您需要使用height
,width
,maxHeight
,maxWidth
个属性。要将其调整为任何浏览器窗口大小,您必须通过单击手册上的resize
选项卡来使用可以看到的events
事件。
答案 1 :(得分:1)
var isFullScreen = false;
function toggleFullScreen() {
var windowW = $(window).width();
var windowH = $(window).height();
if (!isFullScreen) {
//view full screen mode
var wFull = windowW - 100;
var hFull = windowH - 100;
var xLeft = parseInt((windowW / 2) - (wFull / 2));
var yTop = parseInt((windowH / 2) - (hFull / 2));
if (dialog != null) {
dialog.dialog('option' , 'width', wFull);
dialog.dialog('option' , 'height', hFull);
dialog.dialog('option', 'position', [xLeft,yTop]);
}
isFullScreen = true;
} else {
//view normal/original size mode
//use the "dafault" height and width
var xLeft = parseInt((windowW / 2) - (300 / 2));
var yTop = parseInt((windowH / 2) - (200 / 2));
if (dialog != null) {
dialog.dialog('option' , 'width', 300);
dialog.dialog('option' , 'height', 200);
dialog.dialog('option', 'position', [xLeft,yTop]);
}
isFullScreen = false;
}
}