JavaScript:检查窗口是否存在 &&已/未最小化
I want to be sure that any popup opened earlier not only exists, but is not minimized. An earlier discussion talked about checking for the window's existence. I'm guessing (hoping!) that giving focus to an already-open window will restore that window if it's been minimized.
Is that the case, or no?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以同时执行这两种操作,假设“窗口”是您对选项卡或浏览器窗口的引用,并检测焦点并使用以下命令进行设置:
You can do both, assuming 'window' is your reference to the tab or browser window you and detect focus and set it using these: