监听fullscreenchange事件
document.addEventListener('fullscreenchange', (event) => { // document.fullscreenElement will point to the element that // is in fullscreen mode if there is one. If there isn't one, // the value of the property is null. if (document.fullscreenElement) { console.log(`Element: ${document.fullscreenElement.id} entered full-screen mode.`); } else { console.log('Leaving full-screen mode.'); }});


