728x90
๋ฐ์ํ
if (document.hidden)
console.log('๋นํ์ฑํ');
else
console.log('ํ์ฑํ');
์ถ์ฒ:
https://stackoverflow.com/questions/1760250/how-to-tell-if-browser-tab-is-active
How to tell if browser/tab is active
Possible Duplicate: Is there a way to detect if a browser window is not currently active? I have a function that is called every second that I only want to run if the current page is in the
stackoverflow.com
728x90
๋ฐ์ํ