赞
踩
开启全屏
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
}
//FireFox
else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
}
//Chrome等
else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen();
}
//IE11
else if (document.documentElement.msRequestFullscreen) {
document.body.msRequestFullscreen();
}
退出全屏
if (document.exitFullscreen) {
document.exitFullscreen();
}
else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
}
else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}else {
window.parent.showTopBottom();
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。