上一篇 | 下一篇

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

发布: 2006-12-03 17:49 | 作者: 佚名 | 来源: CSDN | 查看: 32次

<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>

TAG: 编程

字号: | 推荐给好友

 

评分:0

我来说两句

seccode