如何在网页中调用Windows快捷方式 [英] How Do I Call Windows Shortcut In Webpages

查看:182
本文介绍了如何在网页中调用Windows快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。

在我的项目中,我需要在Windows环境中调用一些Windows快捷键,如CTRL + O或CTRL + A.



i认为我必须使用Javascript做这个工作..但我不知道我该怎么办



更多细节和例子我想按下按钮,在桌面上选择所有图标(通过模拟CTRL + A)

解决方案

幸运的是你不能做这样的事情......

当你在网页上时你是在浏览器内部关闭,无法访问其外部操作系统的各个部分...

想象一下,您访问一个网站,该网站开始使用您的桌面(或其他更敏感的文件夹) - 任何黑客的梦想......


希望你能理解这将是一个重大的安全问题。所以不,希望这是不可能的。



祝你好运!



ps。在过去(几​​年前),您可以创建自己的activex组件(仅限msie浏览器)以启用此类功能。这导致了许多安全问题。


Hi .
in my project i need to call some windows shortcut like CTRL+O or CTRL+A in windows environment.

i think i must use Javascript to do this work .. but i have no idea what must i do

for more detail and example i want when i press a button , in desktop select all icon ( by simulate CTRL+A )

解决方案

Fortunately you cannot do such thing...
When you are in a web page you are closed inside the browser and have no access to the parts of the OS outside of it...
Imagine you visit a web site and that site start playing around with your desktop (or other more sensitive folders) - a wet dream of any hacker...


Hopefully you can understand this would be a major security issue. So no, hopefully this is not possible.

Good luck!

ps. in the old days (few years back) you could create your own activex component (limited to msie browser) to enable such functionality. This resulted in many security issues.


这篇关于如何在网页中调用Windows快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆