L
linuxcici
Unregistered / Unconfirmed
GUEST, unregistred user!
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
<script language="javascript"
type="text/javascript">
var new_window
function open_window(){
new_window=window.open("http://www.21cn.com","myweb"
alert("the new windows name is: "+ new_window.name )
new_window.focus()
}
</script>
</head>
<body>
<a href="javascript:void(0)"
onClick="open_window()">open www.21cn.com</a>
</body>
</html>
这段代码运行后为什么说new_window.name是被拒绝访问的啊?
<head>
<meta http-equiv="Content-Type"
content="text/html;
charset=gb2312">
<title>无标题文档</title>
<script language="javascript"
type="text/javascript">
var new_window
function open_window(){
new_window=window.open("http://www.21cn.com","myweb"
alert("the new windows name is: "+ new_window.name )
new_window.focus()
}
</script>
</head>
<body>
<a href="javascript:void(0)"
onClick="open_window()">open www.21cn.com</a>
</body>
</html>
这段代码运行后为什么说new_window.name是被拒绝访问的啊?