jquery maximizes the window no matter what the situation_jquery
jquery
When opening a new window, some users want to directly maximize the display without taking another step. If you don't make explicit settings in the code, this is generally a problem with the browser's own settings. But the user hopes that no matter what the situation is, no matter what setting the browser is in, the pop-up window must be maximized, so what should be done? In fact, it's easy to do. We only need to add a few lines of code to change the browser window size from the default to our own settings.
Copy code The code is as follows:
$(function(){
if (window .screen) {
var myw = screen.availWidth;
var myh = screen.availHeight;
window.moveTo(0, 0);
window.resizeTo(myw, myh);
}
});
Coupled with some jquery operations, you can maximize the browser window.
The above method is actually not true maximization, it just adjusts the window to the maximum. The maximize button in the upper right corner is still a single box. After consulting a lot of information, I found that there is a method that can basically realize the complete Maximize:
Copy code The code is as follows:
< head>
< object id=max classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">