1:
var screenHeight = parseInt(screen.height);
var screenWidth = parseInt(screen.width);
var config =
{
width : screenWidth,
height: screenHeight,
params: { enableDebugging:"0" }
};
2:
var screenWidth = parseInt($(document).width());
var screenHeight = parseInt(screenWidth*0.88);
var config =
{
width: screenWidth,
height: screenHeight,
params: { enableDebugging:"0" }
};
第1种将网页分辨率设置成当前屏幕的分辨率,而第2种是将网页的分辨率设置成当前浏览器窗口的分辨率。
时间: 2024-10-16 11:08:21