RE: Javascript Untuk Auto Fullscreen page

Assalamualaikum wrwb Selamat malam Javascript untuk membuat page auto fullscreen bagaimana ya? (Pengganti f11) Udah nnyari di google., pada gagal…. Template pun sudah jadi, hanya ingin menambah fitur 😀 Mohon bantuannya… Terimakasih Wassalamualaikum wrwb

agungs87 TK Ditanyakan on 29 November 2017 pada Java.
Tambah Komentar

Ini lebih lengkap beserta tombol exitnya

<script type="text/javascript">

function cancelFullScreen(el) {

var requestMethod = el.cancelFullScreen||el.webkitCancelFullScreen||el.mozCancelFullScreen||el.exitFullscreen;

if (requestMethod) { // cancel full screen.

requestMethod.call(el);

} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.

var wscript = new ActiveXObject("WScript.Shell");

if (wscript !== null) {

wscript.SendKeys("{F11}");

}

}

}
function requestFullScreen(el) {

// Supports most browsers and their versions.

var requestMethod = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen;
if (requestMethod) { // Native full screen.

requestMethod.call(el);

} else if (typeof window.ActiveXObject !== "undefined") { // Older IE.

var wscript = new ActiveXObject("WScript.Shell");

if (wscript !== null) {

wscript.SendKeys("{F11}");

}

}

return false

}
function toggleFull() {

var elem = document.body; // Make the body go full screen.

var isInFullScreen = (document.fullScreenElement && document.fullScreenElement !== null) || (document.mozFullScreen || document.webkitIsFullScreen);
if (isInFullScreen) {

cancelFullScreen(document);

} else {

requestFullScreen(elem);

}

return false;

}
</script>
Doktor Terjawab on 29 November 2017
Tambah Komentar

Jawaban Anda

Dengan memposting jawaban, anda setuju dengan Kebijakan Privasi dan ketentuan layanan.