亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Event triggered when switching from b page tab to a page tab
歐陽克
歐陽克 2017-06-08 11:03:13
0
2
1194

Maybe there are multiple tab pages opened in the browser. How to get the event when the user switches back to the specified page, such as the tab of page a? And execute the specified js?

歐陽克
歐陽克

溫故而知新,可以為師矣。 博客:www.ouyangke.com

reply all(2)
世界只因有你

1. If it is a Chrome plug-in, there is a related API

2. Your own web page. You can try focus event

window.addEventListener('focus', function () {});
給我你的懷抱

Click to switch, and then switch the page. At this time, there are two event attributes, the onunload and onbeforeunload events will be called,

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template