如果我们有一个页面的全局按键eevent,如何过度写一个按键事件。 [英] how to over write a keypress event if we have a global key press eevent for a page.

查看:122
本文介绍了如果我们有一个页面的全局按键eevent,如何过度写一个按键事件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经写了一些全球性的关键新闻事件,这些事件在所有页面中都很常见。

现在我想写一下关键的新闻事件带有另一个事件的全局事件。

假设在全局事件中键Ctrl我的动作是警告('嗨');因此,在其中一个页面中我想把它写成Alert('Hello');

我该如何实现?

解决方案

< blockquote>你可以将return语句设为false。

试一试。


Hi,
I have written some global key press events which will be common in all the pages.
Now I want to over write that a key press event in global events with an another event.
Suppose in the global event for key "Ctrl" i have action as "Alert('Hi')"; So in one of the page I want to over write this as "Alert('Hello');
How can I achieve that?

解决方案

you can have return statement as false.
try it.


这篇关于如果我们有一个页面的全局按键eevent,如何过度写一个按键事件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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