document.write("关闭")

来源:互联网 发布:java 物联网 编辑:程序博客网 时间:2024/05/18 14:26

1 OpenWindow=window.open("""newwin""height=250, width=250,toolbar=no ,scrollbars="+scroll+",menubar=no"); 
 2  OpenWindow.document.write("<HTML>");
 3  OpenWindow.document.write("<TITLE>例子</TITLE>"); 
 4  OpenWindow.document.write("<BODY BGCOLOR=#ffffff>");
 5  OpenWindow.document.write("<h1>Hello!</h1>");
 6  OpenWindow.document.write("New window opened!");
 7  OpenWindow.document.write("<FORM> ");
 8  OpenWindow.document.write("<INPUT TYPE='BUTTON' VALUE='关闭' onClick='window.close();'>"); 
 9  OpenWindow.document.write("</FORM>");
10
11  OpenWindow.document.write("</BODY>");
12  OpenWindow.document.write("</HTML>");
13  OpenWindow.document.close();