如何以编程方式退出亭子模式
我正在开发一个在Edge(学校默认浏览器)中运行的系统,该浏览器从桌面快捷方式以售货亭模式启动,
“ C:\ Program Files(x86)\ Microsoft \ Microsoft \ Edge \ expact \ MSEDGE \ MSEDGE.EXE” -KIOSK” -KIOSK < a href =“ http://www.program-name.com” rel =“ nofollow noreferrer“> www.program-name.com - edge-kiosk-type =
登录页面上的全屏幕,我可以在进入
<input type="button" onClick="window.close();" value="Close">
程序中,使用关闭按钮,下一页, 我可以使用关闭按钮来退出该程序。 ,窗口。关闭不再有效。退出的唯一方法是使用alt + f4或按下启动键并右键单击边缘图标
I'm developing a system that runs in Edge (school's default browser), the browser launches in Kiosk mode from a desktop shortcut
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --kiosk www.program-name.com --edge-kiosk-type=fullscreen
On the landing page, I can exit the program no problem with a close button using
<input type="button" onClick="window.close();" value="Close">
Once you proceed into the program, next page onwards, window.close no longer works. The only way to quit is by using Alt + F4 or pressing the Start key and right clicking the Edge icon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果打开开发人员工具控制台,当窗口不通过
window.close.close()
:消息很清楚。使用
window.close()
关闭窗口时,会有一些限制。在Chromium中,window.close()
如果新窗口/TAB具有开启器,或者背面/正向堆栈包含少于两个条目。window.close()
的限制用于安全性和用户体验。有关更多详细信息,您可以参考此博客。以编程方式关闭“继续进行窗口”的唯一方法是通过
window.open()
打开窗口。例如,如果要通过单击链接打开新窗口,则可以使用以下代码:然后在 test.html 上使用
window.close()
>关闭窗口。If you open the Developer Tools console, you'll find this message when the window doesn't close by
window.close()
:The message is clear. There're some restrictions when using
window.close()
to close window. In Chromium,window.close()
succeeds if the new window/tab has an opener or if the back/forward stack contains fewer than two entries. The limitation ofwindow.close()
is for security and user-experience. For more detailed information, you can refer to this blog.The only way to close the proceed window programmatically is opening the window by
window.open()
. For example, if you want to open a new window by clicking a link, you can use the code like below:Then on test.html you can use
window.close()
to close the window.