程序员人生 网站导航

javascript 打开网页,窗口慢慢变大效果

栏目:jscript时间:2014-02-19 15:22:42

javascript 打开网页,窗口慢慢变大效果

<script language="javascript">

  var windowsheight=100
  var windowswidth=100
  var numx=5
  function openwindow(thelocation){
  temploc=thelocation
  if
  (!(window.resizeto&&document.all)&&!(window.resizeto&&document.getelementbyid))
  {
    window.open(thelocation)
    return
  }

  windowsize=window.open("","","scrollbars")
  windowsize.moveto(0,0)
  windowsize.resizeto(100,100)
  tenumxt()
  }
  function tenumxt(){
  if (windowsheight>=screen.availheight-3)
    numx=0
  windowsize.resizeby(5,numx)
  windowsheight+=5
  windowswidth+=5
  if (windowswidth>=screen.width-5)
  {
    windowsize.location=temploc
    windowsheight=100
    windowswidth=100
    numx=5
    return
  }
  settimeout("tenumxt()",50)
  }
  </script>
  <p><a href="javascript:openwindow(http://www.wfuyu.com)">进入</a>

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐