简体   繁体   中英

How to implement exact full-screen in javascript?

I tried How to make the window full screen with Javascript (stretching all over the screen) ,

but it's not working.

EDIT

I mean it should fill all of my computer by full-screen.

Like this:

alert("Please press F11");

There's no way to make an existing window completely fullscreen in Javascript.

The closest you can get is to open a popup window and pray that it doesn't get blocked by popup blockers, like this:

open("http://google.com", null, 
  "height=" + screen.availHeight + ",width=" + screen.availWidth + ",status=no,toolbar=no,menubar=no,location=no")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM