试下
if(opener==null)
{
alert("不是open窗口")
}
if(opener==null)
{
alert("不是open窗口")
}
解决方案 »
- window.open问题
- http_request.responseText 不读PHP吗?
- 下拉框问题的再续(可根据输入内容挑选下拉项)
- extjs3.2和4.2版本的结构差别很大,求教其中3.2的tree怎么改到4.2中。
- checkbox至多选一个的问题,想实现只能选一个和全都不选的功能,但是现在只能实现单选,全都不选实现不了,求帮忙
- 时间计算问题,很简单
- 在限定时间内 超过一定的刷新次数 就自动转到登录页面
- 请问如何捕捉页面中光标位置的偏移量,想实现一个书签功能
- 各位高手:为什么用window.location.reload()会提示刷新对话框呢?怎样不让它提示?
- 关于取得浏览器某位置值的问题
- 50分求助!!!!!! 怎样用javascript生成 xml文件
- 如何获得二维数组第二维的长度?
<!--
function showWinName(){
alert (this.name);
}
//-->
</script>
<html>
<head>
<title> New Document </title>
</head><body>
<a href="22.htm" target="_blank">fdsafdas</a>
<a href="22.htm" target="subwin">fdsafdas</a>
<a href="#" onclick="window.open('22.htm','thisisaopenwin')">fdsafdas</a>
</body>
</html>---------------
22.htm<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<script language="JavaScript">
<!--
function showWinName(){
alert (this.name);
}
//-->
</script>
</head><body onload="showWinName()"></body>
</html>
fantiny兄弟,赞一个:)
但是target="subwin",子窗口的name也有值了,
和window.open(url,'subwin1')打开的子窗口一样。我遇到的问题是,要统一处理项目中子窗口,需要区分是由window.open打开的还是点击连接打开的。
但是,由于项目已经接近尾声了,不同的程序员用window.open打开的窗口,有的有name,有的没有name....哭啊!