参数传递问题

llcnllcn 2003-05-15 10:52:40
1.html为父窗口,用window.open()方法打开2.html子窗口
现在如何让1.html知道2.html是打开状态还是被关闭状态?
就是说,在1.html里如何知道2.html是open还是close?
...全文
40 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
michael_monkey 2003-05-16
  • 打赏
  • 举报
回复
http://expert.csdn.net/Expert/topic/1371/1371328.xml?temp=.3776361
51946486 2003-05-16
  • 打赏
  • 举报
回复
var me=window.open('me.html','','width=100,height=100')
用me.closed 状态控制
youbest 2003-05-15
  • 打赏
  • 举报
回复
<script>
win=window.open('2.htm')
</script>
<input type=button value="测试" onclick="if(win.closed==true){alert('窗口已经关闭!')}else{alert('未关')}">
fason 2003-05-15
  • 打赏
  • 举报
回复
<script>
var w=window.open('about:blank','','width=100,height=100')
</script>
<input type=button onclick="if(w.closed)alert('已关闭')">

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧