全屏展示
Posted justsmile2
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了全屏展示相关的知识,希望对你有一定的参考价值。
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <button onclick="fullScreen()">???????????</button> <button onclick="exitScreen()">???????????</button> <button onclick="iefull()">??汾ie???</button> </body> <script src="js/jquery-2.1.1.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> //??? function fullScreen() var el = document.documentElement; var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen; if(typeof rfs != "undefined" && rfs) rfs.call(el); ; return; //?????? function exitScreen() if (document.exitFullscreen) document.exitFullscreen(); else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); else if (document.webkitCancelFullScreen) document.webkitCancelFullScreen(); else if (document.msExitFullscreen) document.msExitFullscreen(); if(typeof cfs != "undefined" && cfs) cfs.call(el); //ie??汾?????????????????????? function iefull() var el = document.documentElement; var rfs = el.msRequestFullScreen; if(typeof window.ActiveXObject != "undefined") //?????? ???f11????????????? var wscript = new ActiveXObject("WScript.Shell"); if(wscript != null) wscript.SendKeys("F11"); //???ie????ActiveX??????????ie????????????????? ??δ??????????н????ActiveX????????????н???? ????????? </script> </html>
以上是关于全屏展示的主要内容,如果未能解决你的问题,请参考以下文章