简体   繁体   English

为什么右键单击事件比左键慢?

[英]Why is right-click event slower than left?

I'm noticing a difference between the execution speeds of a script running on left (onclick=function()) versus right-click (oncontextmenu='function();return false;').我注意到在左侧(onclick=function())和右键单击(oncontextmenu='function();return false;')上运行的脚本的执行速度之间存在差异。 Does anyone know if this is common and if I can make the right-click execution speed just as fast?有谁知道这是否常见以及我是否可以使右键单击执行速度一样快?

I've looked around but haven't really found an answer to this.我环顾四周,但还没有真正找到答案。 Appreciate I may have missed it.感谢我可能错过了它。 Let me know if more info necessary - I'm new to this.如果需要更多信息,请告诉我 - 我是新手。

Sam山姆

As Per my understanding, right click usually provide context options To be fetched From OS and displayed and left click do not have anything to do apart from clicking so right click takes More time to execute.根据我的理解,右键单击通常提供上下文选项要从操作系统中获取并显示,左键单击除了单击之外没有任何作用,因此右键单击需要更多时间来执行。

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

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