When you open a new window, some users want to maximize the display directly, do not want to do one more step. If you don't make a clear setting in your code, this is generally a problem with your browser's own setup. But the user wants no matter what situation, regardless of browser in what kind of setting, want to let this pop-up window maximize, then how to do? Actually very good to do, just put a few lines of code, let the browser window from the default size into our own settings.
Copy Code code as follows:
$ (function () {
if (Window.screen) {
var myw = screen.availwidth;
var myh = screen.availheight;
Window.moveto (0, 0);
Window.resizeto (MYW, MYH);
}
});
Plus some of the operations of jquery, which will enable you to maximize your browser window.
The above method is not really maximize, just adjust the window to the maximum, the top right corner to maximize the button is still a single box, looked at a lot of data, found that there is a way to achieve the basic total maximization:
Copy Code code as follows:
<title>hello</title>
<meta http-equiv= "Pragma" content= "No-cache" >
<meta http-equiv= "Cache-control" content= "No-cache" >
<meta http-equiv= "Expires" content= "0" >
<meta http-equiv= "keywords" content= "keyword1,keyword2,keyword3" >
<meta http-equiv= "description" content= "This are my page" >
<body>
<object id=max classid= "clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11 ><param name=" Command "value=" Maximize "></object>
<input Type=button value= maximize Onclick=max. Click () >
</body>
<script type= "Text/javascript" >
Max. Click ();
</script>
The above code can be copied directly to a page with an. html extension, and running with IE (not tested by other browsers) can achieve full value maximization, either by refreshing or by clicking on the "Maximize" button.
So why do I have to add a basic implementation?
It is because I have not been fully in the actual application to achieve the maximum effect, that is, as long as the above code copy to the server running, even if the slightest change, also does not work, refresh or click the "Maximize" button or not, are ineffective. Why is it that I have to give up the method for the time being?
Sincerely hope that all of you netizens to enlighten!