我想写一个html页面使我的psvita浏览器全屏显示,而像requestFullscreen()
,mozRequestFullScreen()
,msRequestFullscreen()
,webkitRequestFullScreen()
这样的JavaScript API不起作用。
这是html:
<button onclick="launchFullscreen(document.documentElement)">FullScreen</button>
这是JavaScript:
function launchFullscreen(element) {
if(element.requestFullscreen) {
element.requestFullscreen();
} else if(element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if(element.msRequestFullscreen){
element.msRequestFullscreen();
} else if(element.webkitRequestFullscreen) {
element.webkitRequestFullScreen();
}
}