<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>desktop</title>
</head>
<body id="content">
<b onclick="fullscreen()">全屏</b>
</body>
<script type="text/javascript" charset="utf-8">
function fullscreen(){
if (document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement ||
document.msFullscreenElement) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullscreen) {
document.documentElement.webkitRequestFullscreen();
} else if (document.documentElement.body.msRequestFullscreen) {
document.documentElement.body.msRequestFullscreen();
}
}
}
</script>
</html>
全屏模式
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- 取消視頻直播網(wǎng)站的全屏提示“允許使用帶鍵盤控制的全屏模式嗎?”每次看直播全屏經(jīng)常有這個SB提示“取消視頻直播網(wǎng)站的...
- Google發(fā)布nexus7以來,超輕、超薄,成為可單手握持的小尺寸平板典范,而2013年款Nexus7升級至Fu...
- 在Parallels Desktop中,全屏模式下使用Win7,如果Mac電腦自動休眠了,則無法再次喚醒了,喚醒時...
- 強調(diào)內(nèi)容Android 4.4系統(tǒng)(API等級19)引入了一個新 SYSTEM_UI_FLAG_IMMERSIVE...