网络 2021-12-30 15:55
document.addEventListener("visibilitychange", event => { if (document.visibilityState == "visible") { console.log("tab is active")
//活动 } else { console.log("tab is noactive")
//非活动 } })