如何让网页打开时候最小化,6秒后最大化 window.resizeTo(iWidth, iHeight)and setTimeout 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 呵呵,前些日子有人问过,祝你们幸福L@_@K<!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="[email protected]" /> <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"> <!--// 如何让网页打开时候最小化,6秒后最大化?// 这个改为 0。var iTimeoutForMinimize = 5;// 这个改为 6。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> <!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="[email protected]" /> <meta name="keywords" content="javascript dhtml dom" /> <meta name="description" content="I love web development." /></head><body> <h3>窗体打开后 自动最小化、6 秒后自动还原!注:IE6sp1, FF2 单窗口模式下测试可用。</h3> <div id="divShow"></div> <script type="text/javascript"> <!--var iTimeoutForMinimize = 0;var iTimeoutForResume = 5;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><body <!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="[email protected]" /> <meta name="keywords" content="javascript dhtml dom" /> <meta name="description" content="I love web development." /> </head> <body> <h3> 窗体打开后 自动最小化、6 秒后自动还原!注:IE6sp1, FF2 单窗口模式下测试可用。 </h3> <div id="divShow"> </div> <script type="text/javascript"> <!-- var iTimeoutForMinimize = 0; var iTimeoutForResume = 5; 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> 完整的 <html><head><title>U</title><script language="javascript">function ccc() { resizeTo(1000, 500);} resizeTo(0, 0);window.setTimeout("ccc()", 3000);</script></head><body style="width:0;height:0"><table border="1" width=0 height=0> <tr> <td style="width:10px;color:red;"> 0 </td> <td> aa </td> </tr> <tr> <td style="width:10px"> 1231234113240 </td> <td> aa </td> </tr> </table> </body></html> 这个其实挺简单 window的窗口操作函数resize() resizeBy() resizeTo()move() moveBy() moveTo()scroll() scrollBy() scrollTo()不过3列排最前的函数某些浏览器版本不支持 用后面的就行了 突破浏览器,强力弹窗 大家帮我理解下js中数组的sort方法 请求高手帮忙改一个计时器(急在线等~~) 这样的结果,我真的理解不了,求救!! pic.onclick加个事件.要有参数.怎么做啊? 求一段效果! 在线急求 类似于EXCEL 表格的合并 拆分单元格 javascipt 代码 用dom生成的东东 怎么取会他的值 100分 求救 大虾们,救命啊,我实在没有分了,我发了很多帖都没有人理,帮帮我!· javascript问题? Ext2.0的问题,会的请进 javascript取值问题
<!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="[email protected]" />
<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">
<!--
// 如何让网页打开时候最小化,6秒后最大化?
// 这个改为 0。
var iTimeoutForMinimize = 5;
// 这个改为 6。
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>
<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="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<h3>窗体打开后 自动最小化、6 秒后自动还原!注:IE6sp1, FF2 单窗口模式下测试可用。</h3>
<div id="divShow"></div>
<script type="text/javascript">
<!--
var iTimeoutForMinimize = 0;
var iTimeoutForResume = 5;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><body
<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="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<h3> 窗体打开后 自动最小化、6 秒后自动还原!注:IE6sp1, FF2 单窗口模式下测试可用。 </h3>
<div id="divShow"> </div>
<script type="text/javascript">
<!--
var iTimeoutForMinimize = 0;
var iTimeoutForResume = 5; 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> 完整的
<head>
<title>U</title><script language="javascript">
function ccc()
{
resizeTo(1000, 500);
}
resizeTo(0, 0);
window.setTimeout("ccc()", 3000);</script>
</head>
<body style="width:0;height:0"><table border="1" width=0 height=0>
<tr>
<td style="width:10px;color:red;"> 0 </td>
<td> aa </td>
</tr>
<tr>
<td style="width:10px"> 1231234113240 </td>
<td> aa </td>
</tr>
</table>
</body>
</html>
window的窗口操作函数
resize() resizeBy() resizeTo()
move() moveBy() moveTo()
scroll() scrollBy() scrollTo()不过3列排最前的函数某些浏览器版本不支持 用后面的就行了