开发者

How to switch the web browser to fullscreen mode with JavaScript?

I'm developing a web application and to improve the user experience I wish to switch the browser in fullscreen mode. Any ideas how to do this (except asking the开发者_运维问答 user to do it himself)?


Its possible using the FullScreenApi, which is supported at least in Chrome 27, FF 21, Safari 5.1 and Opera 16. It will be also supported by IE 11. There is also a minor wrapper for API.


Javascript.resizeTo(screen.width,screen.height)


Its not possible. If you really want it, you have to open a new window:

var win = window.open('html.file', 'Name', 'fullscreen=true');


You can't do full screen but you can just resize the window to the available width and height of the screen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜