js pops up window.open window

<html> 
<head> 
<SCRIPT LANGUAGE="JavaScript"> 
function openwin() 
{OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no"); 
//写成一行 
OpenWindow.document.write("<TITLE>例子</TITLE>") 
OpenWindow.document.write("<BODY BGCOLOR=#ffffff>") 
OpenWindow.document.write("<h1>Hello!</h1>") 
OpenWindow.document.write("New window opened!") 
OpenWindow.document.write("</BODY>") 
OpenWindow.document.write("</HTML>") 
OpenWindow.document.close()} 
</SCRIPT> 
</head> 
<body> </body> <input type="button" onclick="openwin()" value="Open window"> 
<a href="#" onclick="openwin()">Open a window</a> 


</html>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324593731&siteId=291194637