「JavaScript入門」requestFullScreen()でページのフルスクリーンを実行するサンプル

JSコード
function FullScreenEnterFunc() {
document.getElementById(‘cft’).style.height = screenHeight+”px”;
var d= document.getElementById(‘cft’);
if (d.requestFullscreen) {
d.requestFullScreen();
} else if (d.webkitRequestFullScreen) {
d.webkitRequestFullScreen();
} else if (d.mozRequestFullScreen) {
d.mozRequestFullScreen();
} else {
d.msRequestFullscreen();
}
}

Comments are closed.