简体   繁体   English

如何在所有浏览器中以全屏模式显示没有状态栏和地址栏的网页?

[英]How to show a web page in full screen mode without statusbar and addressbar in all browsers?

如何在所有浏览器中以全屏方式显示没有状态栏和地址栏的网页,并且它也不应该显示任务栏。

You can't do this with JavaScript - and that's a good thing...I don't want a full screen advertisement in my face, do you? 你不能用JavaScript做到这一点-这是一件好事 。我不希望在我的脸上全屏广告,你呢?

Pseudo-out-of-browser plugins can do some of this though, Flash and Silverlight for example...but you can't do it with just a page and JavaScript. 伪装浏览器插件可以执行某些操作,例如Flash和Silverlight ...但是您不能仅使用页面和JavaScript来执行此操作。 Browsers (especially newer ones) actively prevent most resizing and windows-without-bars behavior. 浏览器(尤其是较新的浏览器)会积极阻止大多数调整大小和无栏窗口行为。

If I want MY browser to be in full screen mode, I will press F11. 如果我的浏览器是在全屏模式下, 会按F11。

It is MY browser. 这是我的浏览器。 Not yours. 不是你的。

You cannot do this, as Javascript can only change things inside the webpage. 您无法执行此操作,因为JavaScript只能更改网页内的内容。 It cannot change the behaviour of the browser itself. 它无法更改浏览器本身的行为。

You cannot do this in javascript. 您无法在javascript中执行此操作。 The reason is that someone might make a screen that looks like a windows lock screen and force users to type in their username/password. 原因是有人可能制作出类似于Windows锁定屏幕的屏幕,并迫使用户键入其用户名/密码。 Its called phishing and illegal : http://en.wikipedia.org/wiki/Phishing . 它被称为网络钓鱼和网络钓鱼: http//en.wikipedia.org/wiki/网络钓鱼。 For right usage you can ask the user to opt into it (the user has to click a button) using Silverlight / Flash. 为了正确使用,您可以要求用户使用Silverlight / Flash选择加入(用户必须单击一个按钮)。 However in this case the keys that function are limited. 但是,在这种情况下,功能键受到限制。 So you cannot get the user to type alphanumeric keys. 因此,您无法使用户键入字母数字键。 Keys commonly used in games (eg space / arrow keys) will function. 游戏中常用的键(例如空格/箭头键)将起作用。 So will mouse clicks. 鼠标单击也会如此。 With Silverlight if the user accepts you application to be Trusted (FullTrust) you can even capture all keys : http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx 使用Silverlight,如果用户接受您的应用程序为Trusted(FullTrust),则您甚至可以捕获所有密钥: http : //timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete -guide-new-features.aspx

I did not get what really you wants? 我没有得到您真正想要的? You want code to your page OR manually you want to do with browsers. 您需要将代码添加到页面上,或者手动使用浏览器进行操作。

If while browsing you want to do IE, Mozilla, Google chrome etc. will Do it with "F11" key (Short cut key) 如果在浏览时要执行IE,Mozilla,Google chrome等操作,请使用“ F11”键(快捷键)进行操作

(Highly NOT RECOMMENDED, but you can try * ) *If you want javascript for this, here it is... (高度不推荐,但是您可以尝试 * *如果您想要使用javascript,这里是...

<SCRIPT LANGUAGE="JavaScript">
function fullScreen(theURL) {
window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
}
</SCRIPT>

<--- BODY OF DOCUMENT -->

<body onload="fullScreen('popup_webpage.htm');">

this will open the webpage in new pop-up on page load. 这将在页面加载时以新的弹出窗口打开网页。

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

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