简体   繁体   English

如何在javascript中实现精确的全屏?

[英]How to implement exact full-screen in javascript?

I tried How to make the window full screen with Javascript (stretching all over the screen) , 我试过如何使用Javascript(在屏幕上伸展)使窗口全屏显示

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. 在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")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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