打印本文 打印本文 关闭窗口 关闭窗口
一种打开子窗口的方法[父页内创建子窗口]
作者:武汉SEO闵涛  文章来源:敏韬网  点击数702  更新时间:2009/4/23 11:23:06  文章录入:mintao  责任编辑:mintao
<html>
  <head>
  <title>Test</title>
<script>
function openSubWin()
  {
  subWindow=window.open("", "newwin", "height=250, width=250,toolbar=no ,scrollbars="+scroll+",menubar=no"); 
  subWindow.document.write("<TITLE>Op</TITLE>")
  subWindow.document.write("<BODY BGCOLOR=#ffffff>")
  subWindow.document.write("<h1>Hello!</h1>")
  subWindow.document.write("New window opened!")
  subWindow.document.write("</BODY>")
  subWindow.document.write("</HTML>")
  subWindow.document.close() ;
  }

</script>
  </head>
  <body>
  <a href="#" onclick="openSubWin()">open</a>
  </body>
  </html>

打印本文 打印本文 关闭窗口 关闭窗口