一种打开子窗口的方法[父页内创建子窗口]

发表于:2007-07-01来源:作者:点击数: 标签:
html head titleTest/title script function openSubWin() { subWindow=window.open("", "newwin", "height=250, width=250,toolbar=no ,scrollbars="+scroll+",menubar=no"); subWindow.document.write("TITLEOp/TITLE") subWindow.document.write("BODY BGC
<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>

原文转自:http://www.ltesting.net