简体   繁体   English

Windows关闭或从浏览器注销

[英]Windows shutdown or logoff from browser

I understand the potential security consequences of allowing shutdown or logoff from a browser, but I have an application running in a locked down 'kiosk' mode, and would like to be able to offer the user a shutdown or logoff option. 我了解允许从浏览器关闭或注销的潜在安全后果,但是我有一个在锁定的“信息亭”模式下运行的应用程序,并且希望能够为用户提供关闭或注销选项。

Is it possible to tell Windows to logoff or shutdown from Javascript within a browser? 是否可以告诉Windows在浏览器中从Javascript注销或关闭?

Sorry JavaScript cannot do this. 抱歉,JavaScript无法执行此操作。 You're best bet is if the user's browser encounters a unique glitch, thus restarting their computer. 最好的选择是,如果用户的浏览器遇到独特的故障,从而重新启动计算机。 I remember I once had a program that always glitched out in Internet Explorer (I don't recall if it was 5.0 or 6.0) and restarted the user's computer. 我记得我曾经有一个程序总是在Internet Explorer中出现故障(我不记得它是5.0还是6.0)并重新启动了用户的计算机。 Sorry I don't recall the code but it had something to do with void and a for in loop. 抱歉,我不记得代码,但是它与void和for in in loop有关。

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

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