3-5.htm

来自「JScript网页特效,包含很多的实现网页特效的方法.」· HTM 代码 · 共 53 行

HTM
53
字号
<html>
<head>
<title>自动变大的窗口特效</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<script language="javascript">
<!--//Begin code
var x=5
var winheight=100
var winsize=100

function openwindow(thelocation)
{
  temploc=thelocation
  if (!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
  {
    window.open(thelocation)
    return
  }
  winnew=window.open("","","scrollbars")
  winnew.moveTo(0,0)
  winnew.resizeTo(100,100)
  go2()
}

function go2()
{
  if (winheight>=screen.availHeight)
    x=0
  winnew.resizeBy(5,x)
  winheight+=5
  winsize+=5
  if (winsize>=screen.width)
  {
    winnew.location=temploc
    winheight=100
    winsize=100
    x=5
    return
  }
setTimeout("go2()",50)
}
//End code
-->

</script>

<p><a href="javascript:openwindow('http://www.coolbi.com')">打开窗口一</a> 
<p><a href="javascript:openwindow('http://www.sina.com.cn')">打开窗口二</a> 
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?