$(window).blur(function(){ //your code here console.log('window blur'); }); $(window).focus(function(){ //your code here console.log('window fouse'); });
浏览器窗口失去和获得焦点
最新推荐文章于 2024-04-18 23:22:15 发布
$(window).blur(function(){ //your code here console.log('window blur'); }); $(window).focus(function(){ //your code here console.log('window fouse'); });