Is there a Javascript or jQuery method to minimize the current browser window?
-
9That would be pretty scary!BobbyShaftoe– BobbyShaftoe2009年03月02日 10:00:31 +00:00Commented Mar 2, 2009 at 10:00
4 Answers 4
There is no way to minimize the browser window within javascript.
There are ways to change the size of the window, but no true minimization (nice word)
1 Comment
No, there isn't. However, depending on what you're doing and which browsers you're targeting, you could play around with the blur and focus events of the window to achieve similar effect.
1 Comment
If you use an extension, then you can minimize by chrome.windows.update(window.id, { state: 'minimized' })
Comments
I hope this is what you are looking for:
<SCRIPT LANGUAGE="JavaScript">
function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}
function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}
</SCRIPT>
<A HREF="javascript:onClick=Minimize()">Minimize</A>
<A HREF="javascript:onClick=Maximize()">Maximize</A>