function fullscreen() { if (document.body.requestFullscreen) { return document.body.requestFullScreen(); } else if (document.body.webkitRequestFullScreen) { return document.body.webkitRequestFullScreen(); } else if (document.body.mozRequestFullScreen) { return document.body.mozRequestFullScreen(); } else { return document.body.msRequestFullscreen(); } } fullScreen();