简体   繁体   English

Internet Explorer全屏模式?

[英]Internet Explorer full screen mode?

I am building a web based free dynamic news reader (aka "autoplay" feature), that you can test it from here: 我正在构建一个基于Web的免费动态新闻阅读器(又名“自动播放”功能),您可以从此处进行测试:

http://www.fivetechsoft.com/news http://www.fivetechsoft.com/news

and I would like to implement a button to fullscreen it. 我想实现一个按钮以全屏显示。 Any hints? 有什么提示吗?

Please notice that only IE is supported by now. 请注意,目前仅支持IE。 Other browsers support comming soon. 其他浏览器支持即将推出。

This will simply send F11. 这只会发送F11。 Will be good enough for IE with weak security settings. 对于安全性较弱的IE来说已经足够了。 This is something you might want to keep for internal use only, though: 不过,您可能只想保留这些东西供内部使用:

<script type="text/javascript">
    function max() {
        var wscript = new ActiveXObject("Wscript.shell");
        wscript.SendKeys("{F11}");
    }
</script>

Here is some information regarding that problem: http://www.htmlgoodies.com/beyond/dhtml/article.php/3470521 以下是有关该问题的一些信息: http : //www.htmlgoodies.com/beyond/dhtml/article.php/3470521

And to sum up the info, paste this bit of JS into the head of the code. 并总结信息,请将这部分JS粘贴到代码的开头。

<script>
<!--
window.open("bigpage.html","fs","fullscreen=yes")
//-->
</script> 

If you have control of the machine, such as in a kiosk installation, you can launch IE in "kiosk mode" by running a batch file and supplying a URL: (save this string and name as "launch.bat") 如果您控制了计算机,例如在信息亭中进行安装,则可以通过运行批处理文件并提供URL来以“信息亭模式”启动IE :(将字符串和名称保存为“ launch.bat”)

start iexplore.exe -k "c:\Kiosk\default.htm"

or 要么

start iexplore.exe -k "http://www.google.com"
<script>
var splashWin = window.open("http://google.com", "win",
    "fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")
</script>

Google is your friend: Google是您的朋友:

http://webfx.eae.net/dhtml/splashwin/splashwin.html http://webfx.eae.net/dhtml/splashwin/splashwin.html

:) :)

You could add a "best viewed in full-screen mode" notice in your page - that would work, too. 您可以在页面中添加“在全屏模式下观看效果最佳”的通知-也可以。

[I want to programatically] fullscreen the currently viewed [window] [我想以编程方式]全屏显示当前查看的[窗口]

You see, what you're asking for is not possible in most browsers, and that is a Good Thing™ 您会发现,大多数浏览器无法实现您所要求的功能,这就是Good Thing™

Imagine the possibilities - you enter a website, it programatically switches you to fullscreen and keeps you there if you try to go back. 想象一下可能性-您进入一个网站,以编程方式将您切换到全屏状态,并在尝试返回时保持在该位置。 Living with uncloseable pop-ups was bad enough, manipulating the browser programatically would be a (security, usability, what-have-you) nightmare. 生活在无法关闭的弹出窗口中已经够糟糕了,以编程方式操纵浏览器将是一场(安全,可用性,所需要的东西)噩梦。

Most professional games have a pre-coded button to interface the user to full screen, as an option to the F11 Key. 大多数专业游戏都有一个预编码按钮,可以将用户与全屏界面交互,作为F11键的选项。 It should not be viewed as a bad thing. 不应将其视为一件坏事。

To achieve full screen on launch of ie: 要实现全屏启动,即:

Right click on the desktop launch icon... and and in the Target Field, append -k "http://www.google.com" 右键点击桌面启动图标...,然后在目标字段中附加-k "http://www.google.com"

The complete target field should look something like 完整的目标字段应类似于

"C:\Program Files (x86)\Internet Explorer\iexplore.exe" -k "http://www.google.com"

This disables all IE toolbars, addressbards you name it , you cant push F11 return to normal view either 这将禁用所有IE工具栏,您为其命名的地址栏,也无法将F11推回正常视图

This code gets closer, but still is opening a new window and the window caption remains visible: 这段代码越来越近,但是仍然在打开一个新窗口,并且窗口标题仍然可见:

window.open(location.href,'fullscreen','fullscreen,scrollbars') window.open(location.href,'全屏','全屏,滚动条')

so still it is not the same as pressing F11 :-( 所以还是和按F11不一样:-(

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

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