全屏f11 效果

document.getElementById("fullvoide").onclick=function(){
     var el = document.documentElement; 
     var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen; 
     if (typeof rfs != "undefined" && rfs) { 
              rfs.call(el); 
         } else if(typeof window.ActiveXObject != "undefined"){
              var wscript = new ActiveXObject("WScript.Shell");
              if (wscript!=null) { 
                wscript.SendKeys("{F11}"); 
         }
     }  
  }
posted @ 2016-06-17 18:07  幹掉上帝  阅读(135)  评论(0编辑  收藏  举报