我正在处理一些网页,想知道是否可以判断我的页面是否不是网络浏览器上的事件页面。我想知道我的页面是否已最小化或不是当前选项卡。我不是在询问特定的语言,而是想知道是否有可能获得此类信息。
最佳答案
是的,这完全有可能,使用 javascript。
查看这些答案:
Determine whether webpage has foreground window focus/is active tab?
How to tell if browser/tab is active
Is there a way to detect if a browser window is not currently active?
关于javascript - 是否可以判断用户是否将我的页面最小化或处于非事件状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5847108/