如何用vbscript做一个弹出式的窗口,并在弹出前指定弹出窗口的内容?

如何用vbscript做一个弹出式的窗口,在弹出前指定弹出窗口的内容?谢谢了
---------------------------------------------------------------

 1<html>
 2<head>
 3<script language="VBScript">   
 4function openwin()   
 5  
 6set OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");   
 7//写成一行   
 8OpenWindow.document.write("<TITLE>例子</TITLE>")   
 9OpenWindow.document.write("<BODY BGCOLOR=#ffffff>")   
10OpenWindow.document.write("<h1>Hello!</h1>")   
11OpenWindow.document.write("New window opened!")   
12OpenWindow.document.write("</BODY>")   
13OpenWindow.document.write("</HTML>")   
14OpenWindow.document.close()   
15end function   
16</script>
17</head>
18<body>
19<a href="#" onclick="openwin()">打开一个窗口</a>
20<input onclick="openwin()" type="button" value="打开窗口"/>
21</body>
22</html>
Published At
Categories with Web编程
comments powered by Disqus