JavaScript疑问

来源:百度知道 编辑:UC知道 时间:2024/06/22 22:54:58
下面的代码为什么不能工作呢,在本地网页上写不出新浪的网址,连hello都写不出,怎样才能在本地网页上获得新浪的网址呢
<html>
<head>
<title> hello </title>
</head>
<body>
<script language = "javascript">
var nw = "";
nw = window.open("http://www.sina.com.cn","new");
if(nw != "") {
nw.document.open();
documnet.write(nw.document.URL);
}
document.write("hello");
</script>
</body>
</html>

基于安全的原因,如果OPEN的窗口和父窗口在一个域中,就可以访问,不在一个域中是不允许互访的
这个域,你可以理解为一个网站。

去“msconfig>系统实用配置里修改 ”

废话,让你这么改,那不是又可以简单的生出很多网络钓鱼了,