正 文

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


www.7dspace.com  更新日期:2005-8-16 5:49:58  七度空间


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


上一篇:JavaScript网页验证函数(使用正则表达式)
下一篇:UBB编辑器原来就这么简单
作者:  来源: ( 责任编辑:7dspace )
收藏此页】【打印】【关闭
站 内 搜 索
 

热 点 导 读
特 别 推 荐