📄 cook6.htm
字号:
<html>
<head>
<title>自由控制打开的窗口</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
closetime = 10; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds
function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}
function doPopup() {
url = "zh6.htm"; // change to your popup page URL
width = 267; // width of window in pixels
height = 103; // height of window in pixels
delay = 5; // 可以改打开窗口的延迟时间
timer = setTimeout("Start(url, width, height)", delay*1000);
}
// End -->
</script>
</head>
<body bgcolor="#fef4d9" OnLoad="doPopup();">
<center><font color=red face="隶书" size=6>自由控制打开的窗口</font></center><br>
<br>
<center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center><font size=4 color=red face="Arial, Helvetica, sans-serif"><strong>过5秒钟窗口就会打开<br>而且可以控制窗口<br>打开的位置及大小.</strong></font></td></tr>
</table></center>
<br>
<center>
<textarea name=source rows=12 cols=45 class=yk9>
脚本说明:
第一步:把如下代码加入<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
closetime = 0; // Close window after __ number of seconds?
// 0 = do not close, anything else = number of seconds
function Start(URL, WIDTH, HEIGHT) {
windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
preview = window.open(URL, "preview", windowprops);
if (closetime) setTimeout("preview.close();", closetime*1000);
}
function doPopup() {
url = "1.htm"; // change to your popup page URL
width = 267; // width of window in pixels
height = 103; // height of window in pixels
delay = 5; // time in seconds before popup opens
timer = setTimeout("Start(url, width, height)", delay*1000);
}
// End -->
</script>
第二步:把<body>区域中内容改为
<BODY OnLoad="doPopup();">
</textarea>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide
function goHist(a)
{
history.go(a);
}
//-->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -