//模拟F11
function F11key(){
//判断是否ie并进行相应的全屏
//requestFullScreen()
var navigatorName = "Microsoft Internet Explorer";
if( navigator.appName == navigatorName ){
//alert("ie")
var WsShell = new ActiveXObject('WScript.Shell')
WsShell.SendKeys('{F11}');
}else{
var de = document.documentElement;
if (de.requestFullscreen) {
de.requestFullscreen();
} else if (de.mozRequestFullScreen) {
de.mozRequestFullScreen();
} else if (de.webkitRequestFullScreen) {
de.webkitRequestFullScreen();
}else if (de.msRequestFullscreen) {
de.msRequestFullscreen();
}
//alert("not ie")
}
}
示例代码:
<video controls src="" width="250" height="250" onpause="width='要还原的宽度 ';height='要还原的高度'" onplaying="width='适合屏幕的宽度';height='适合屏幕的高度 '"></video>
.....全屏播放啊整个屏幕就剩播放器?怎么实现?
默认的有那个按钮吧?
Your browser does not support the video tag.
这样会调用浏览器默认控件