日期:2014-05-16  浏览次数:20364 次

求一段JS自动让浏览器最小化代码!在html调用!
不要那弹窗了,就自动最小化的js代码,网上我搜了很久,发现的都不能用!请大家帮忙,谢谢!!!

------解决方案--------------------
俺又去查了查手册发现还是有办法滴,哈

L@_@K
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>dhtml.window.simulateMinimize.html</title>
    <meta name="generator" content="editplus" />
    <meta name="author" content="Gao YiXiang" />
    <meta name="email" content="yixianggao@126.com" />
    <meta name="keywords" content="javascript dhtml dom" />
    <meta name="description" content="I love web development." />
</head>
<body>
    <h3>窗体打开后 5 秒自动最小化、2 秒后自动还原!注:IE6sp1, FF2 单窗口模式下测试可用。</h3>
    <div id="divShow"></div>
    <script type="text/javascript">
    <!--
var iTimeoutForMinimize = 5;
var iTimeoutForResume = 2;

var oShow = document.getElementById("divShow");
showMessage();
var iTimerID = setInterval(showMessage, 1000);
setTimeout(minimizeWindow, 1000*iTimeoutForMinimize);

function showMessage()
{
    oShow.innerHTML = "Minimize current window after " + iTimeoutForMinimize-- + " seconds.";
}
function minimizeWindow()
{
    clearInterval(iTimerID);
    resizeTo(0, 0);
    moveTo(screen.availWidth, screen.availHeight);
    setTimeout(resumeWindow, 1000*iTimeoutForResume);
}
function resumeWindow()
{
    moveTo(-4, -4);
    resizeTo(screen.availWidth, screen.availHeight);
}
    //-->
    </script>
</body>
</html>

------解决方案--------------------
送你三本手册!

DHTML参考手册
http://download.csdn.net/source/308913

样式表中文手册
http://download.csdn.net/source/304124

JScript语言参考
http://download.csdn.net/source/308916
------解决方案--------------------
汗!不会改?
------解决方案--------------------
这不是真正意义上的最小化吧,仅是个模拟而以~
------解决方案--------------------
模擬就行了。不然你以为啊。浏览器是没有最小接口供调用的