$(function(){
// 满屏幕方法
$("#fullScreen").click(function(){
fullScreen()
}).trigger("click")
function fullScreen (){
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"){
// ie支持
var wscript = new ActiveXObject("WScript.Shell");
if (wscript!=null) {
wscript.SendKeys("{F11}");
}
}
};
fullScreen();
});
-
« 上一篇:
js阻止选中文本
-
浏览器上如何显示title 图标 icon图标
:下一篇 »