js监听全屏下的esc事件
window.onresize = function() { if (!checkFull()) { //触发esc事件,执行业务逻辑。 } }; function checkFull() { var isFull = document.fullscreenEnabled || window.fullScreen || document.webkitIsFullScreen || document.msFullscreenEnabled; if (isFull === undefined) isFull = false; return isFull; }