jquery Implementation window Maximization no matter what the situation _jquery

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.