案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function checkWin()
5
  {
6
  document.write("The new window's name is: " + myWindow.name)
7
  }
8
</script>
9
</head>
10
<body>
11
12
<script type="text/javascript">
13
myWindow=window.open('','MyName','width=200,height=100')
14
myWindow.document.write("This is 'myWindow'")
15
</script>
16
17
<input type="button" value="What's the name of 'myWindow'?" onclick="checkWin()">
18
19
</body>
20
</html>
21