页面窗体 关闭的时候触发时间 js方式 window.addEventListener("beforeunload", function(event) { clearTimeout(window.video_timer); //清除定时 });