if (document.hidden !== undefined) {
document.addEventListener('visibilitychange', () => {
console.log(document.hidden)
})
}
if (document.hidden !== undefined) {
document.addEventListener('visibilitychange', () => {
console.log(document.hidden)
})
}
本文标题:JS监听浏览器tab页切换
本文链接:https://www.haomeiwen.com/subject/comucltx.html
网友评论