禁用 IE 6 中的特定键
我需要禁用 Internet Explorer 6 中的特定键(Ctrl 和 Backspace)。是否有注册表黑客可以执行此操作。 必须是IE6。 谢谢。
长编辑:
@apandit:哎呀。 我需要更具体地了解退格键的事情。 当我说禁用退格键时,我的意思是禁用退格键模仿后退浏览器按钮的功能。 在 IE 中,当焦点不在文本输入字段中时按 Backspace 相当于按 Back(浏览到上一页)。
至于Ctrl键。 有些页面包含创建新 IE 窗口的链接。 我打开了弹出窗口阻止程序,可以阻止此操作。 但是,按住 Ctrl 键单击会启动新窗口。
这是一个信息亭应用程序,目前是一个基于 Web 的应用程序。 客户目前没有资金来使他们的网站信息亭变得友好。 URL 过滤和禁用 URL 输入字段等操作已经完成。
谢谢。
I need to disable specific keys (Ctrl and Backspace) in Internet Explorer 6. Is there a registry hack to do this. It has to be IE6. Thanks.
Long Edit:
@apandit: Whoops. I need to more specific about the backspace thing. When I say disable backspace, I mean disable the ability for Backspace to mimic the Back browser button. In IE, pressing Backspace when the focus is not in a text entry field is equivalent to pressing Back (browsing to the previous page).
As for the Ctrl key. There are some pages which have links which create new IE windows. I have the popup blocker turned on, which block this. But, Ctrl clicking result in the new window being launched.
This is for a kiosk application, which is currently a web based application. Clients do not have the funds at this time to make their site kiosk friendly. Things like URL filtering and disabling the URL entry field is already done.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我正在使用这个 jQuery 解决方案(在 ie6 和 firefox 3.6 上测试):
希望它对某人有帮助
I'm using this jQuery solution (tested on ie6 and firefox 3.6):
hope it helps someone
您无法从网页执行此操作。 网络浏览器的主要目的之一是保护用户免受互联网侵害。 它们定义了网站可以执行的一组非常具体的操作,并且禁用按钮不在列表中。
另一方面,如果您是网络管理员并且只是想扰乱您的用户,您也许可以通过某些桌面软件来做到这一点。 但我不会屏住呼吸。
You can't do it from a web page. One of the main purposes of a web browser is to protect users from the internet. They define a very specific set of things that web sites can do, and disabling buttons isn't in the list.
On the other hand, if you're a network admin and just want to mess with your users, you might be able to do it via some desktop software. But I wouldn't hold my breath.
您需要这个的目的是什么? 因为禁用退格键对于输入网址或电子邮件等来说会很糟糕。
如果我们更好地了解问题,我们可以推荐其他解决方法。
编辑1:
该网站似乎有一些有关如何完成的信息。 我目前无法验证,但我会调查一下:
http://www.ozzu.com/programming- forum/disable-key-and-back-t44867.html
编辑 2:
该网站有一些关键代码:
http://www.advscheduler.com/docs/manual/type_sendkeys.html
退格键似乎是 08。
编辑 3:
找到了更多用于阻止的代码,请查看:
好的,现在您应该拥有执行此操作所需的所有内容。 要禁用退格键,键码是 08。您可能只需使用我发布的代码,稍加修改即可...:\
尝试一下,看看它是否是您所需要的。 (我希望你知道如何使用Javascript。)
For what purpose do you need this? Because disabling the backspace would be hell for typing urls or emails, etc.
We could recommend other workarounds if we knew the problem better.
EDIT 1:
This website seems to have some information as to how it's done. I can't verify it currently, but I'll look into it:
http://www.ozzu.com/programming-forum/disable-key-and-back-t44867.html
Edit 2:
This website has some key codes:
http://www.advscheduler.com/docs/manual/type_sendkeys.html
It seems BACKSPACE is 08.
EDIT 3:
Found some more code for blocking, check this out:
Ok, now you should have all you need to do it. To disable backspace, the keycode is 08. You can probably just use the code I posted with slight modifications only... :\
Try it out and see if it's what you needed. (I hope you know how to use Javascript.)