我们可以在访问密钥属性中使用ctrl而不是alt吗? [英] can we use ctrl instead of alt in access key property ?

查看:82
本文介绍了我们可以在访问密钥属性中使用ctrl而不是alt吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



i希望使用键盘快捷键保存表中的数据ctrl + save ...我尝试了一些javascripts bt那些不在母版页中工作。 ..有什么解决方案吗?







我们可以使用ctrl代替alt访问关键属性?





先谢谢先生:)

hello,

i want to save data in table using keyboard shortcuts ctrl + save ... i tried some of javascripts bt those are not working in master page ...is there any solution for this ?

or

can we use ctrl instead of alt in access key property ?


thanks in advance sir :)

推荐答案

这取决于你是怎么做到的首先,有 accesskey 属性,您可以将其应用于输入控件:

http://www.w3schools.com/tags/att_global_accesskey.asp [ ^ ]。



如您所见,实际访问权限取决于浏览器。你不能做任何事情。但这是最推荐的方法。请理解:每个用户都习惯了自己喜欢的浏览器(至少有很多用户)。那些用户想要使用他们浏览器的典型访问方法。



你可以通过直接处理来引入你自己的方法,比方说, onkeydown 任何你想要的事件。在处理程序中,您可以使用 focus()方法来设置键盘焦点,因此行为可以等同于访问键方法。请参阅: http://www.w3schools.com/jsref/event_onkeydown.asp [ ^ ],

http://www.w3schools.com/jsref/met_html_focus.asp [ ^ ]。





I会不推荐它。



-SA
It depends on how you do it. First of all, there is the accesskey attribute which you can apply to input controls:
http://www.w3schools.com/tags/att_global_accesskey.asp[^].

As you can see, the actual access depends on the browser. You cannot do anything to it. But this is the most recommended method. Please understand: each user is used to her/his favorite browser (at least many of them). Those users want to use the access methods typical for their browsers.

And you can introduce your own method(s) by directly handling, say, onkeydown events on whatever you want it. In a handler, you can use the focus() method to set a keyboard focus, so the behavior could be equivalent to the access key approach. Please see: http://www.w3schools.com/jsref/event_onkeydown.asp[^],
http://www.w3schools.com/jsref/met_html_focus.asp[^].


I would not recommend it.

—SA


这篇关于我们可以在访问密钥属性中使用ctrl而不是alt吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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