<html xmlns="http://www.w3.org/1999/xhtml">
    
<head>
        
<title>打开一个窗口</title>
        
<script type="text/javascript">
            
function openwin()
            

            OpenWindow
=window.open("""测试程序""height=200, width=200,toolbar=no,scrollbars=scroll,menubar=no");
            OpenWindow.document.write(
"<TITLE>测试程序</TITLE>")
            OpenWindow.document.write(
"<BODY BGCOLOR=#ffffff>")
            OpenWindow.document.write(
"<h1>测试程序</h1>")
            OpenWindow.document.write(
"新页面")
            OpenWindow.document.write(
"</BODY>")
            OpenWindow.document.write(
"</HTML>")
            OpenWindow.document.close()
            }

        
</script>

    
</head>
    
<body>
        
<input type="button" onclick="openwin()" value="打开窗口"/>
    
</body>
</html>
 
posted on 2007-06-26 13:53  wkjs  阅读(201)  评论(0编辑  收藏  举报