javascript Window.open 最大化大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22857500/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 23:53:59  来源:igfitidea点击:

Window.open with maximize size

javascriptasp.netinternet-explorer-8

提问by Singaravelan

 URL = "window.open('../GBY/Reports/ReportViewer.aspx?ReportParams=" + ReportParams + "&ReportName=" + ReportName + "  ' , '_blank');";

            ScriptManager.RegisterClientScriptBlock(this.Page, typeof(UpdatePanel), "OPEN_WINDOW", URL, true);

We use above code to open report viewer in another window. But that window open not maximized size. I want to open as maximize size. How to do that with above code?

我们使用上面的代码在另一个窗口中打开报表查看器。但是那个窗口打开没有最大化大小。我想以最大尺寸打开。如何用上面的代码做到这一点?

回答by ghost...

 window.open('index.html','_blank','fullscreen=yes');

Try this

试试这个

function openWin()
{
myWindow = window.open("","","width=100,height=100"); // Opens a new window
}

function resizeWin()
{
 myWindow.resizeTo(250,250);                           // Resizes the new window
 myWindow.focus();                                     // Assures that the new window gets      focus
}