Javascript实现浏览器的全屏控制
功能全屏(){
var el = document.documentelement,
RFS = el.requestfullscreen el.webkitrequestfullscreen el.mozrequestfullscreen el.msrequestfullscreen | | | | | |,
Wscript;
如果(typeof RFS!=定义的RFS){
rfs.call(EL);
返回;
}
如果(typeof window.activexobject!=未定义){
名=新的ActiveX对象(wscript。壳);
如果(名){
Wscript.SendKeys({ F11 } );
}
}
}
功能exitfullscreen(){
变量=文档,
CFS = el.cancelfullscreen el.webkitcancelfullscreen el.mozcancelfullscreen el.exitfullscreen | | | | | |,
Wscript;
如果(typeof CFS!=未定义的CFS){
cfs.call(EL);
返回;
}
如果(typeof window.activexobject!=未定义){
名=新的ActiveX对象(wscript。壳);
如果(名!= NULL){
Wscript.SendKeys({ F11 } );
}
}
}
以上是本文的全部内容,希望大家能喜欢。