(function () {
var viewFullScreen = document.getElementById("view-fullscreen");
if (viewFullScreen){
viewFullScreen.addEventListener("click", function (){
var docElm = document.documentElement;
if (docElm.requestFullscreen){
docElm.requestFullscreen();
}else if (docElm.msRequestFullscreen) {
docElm = document.body;//overwrite the element (for IE) docElm.msRequestFullscreen();
}else if (docElm.mozRequestFullScreen){
docElm.mozRequestFullScreen();
} else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
}, false);
}
}
window.onresize = function(){
// alert(screenSatus)
if(f_IsFullScreen() == true){
$(".tab-menu").hide(500);
}else{
$(".tab-menu").show();
}
};
//判断浏览器是否全屏
function f_IsFullScreen() {
return (document.body.scrollHeight == window.screen.height && document.body.scrollWidth == window.screen.width);
}