我如何收听点击事件? [英] How do I listen click events ?

查看:81
本文介绍了我如何收听点击事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨! 


我想知道浏览器上的点击次数(Chrome)会触发哪些操作。
当我按下页面上的A按钮时,我想检测并记录它。
我该怎么办?





我的尝试:



 monitorEvents(document.body,click); 

解决方案

点击是指鼠标点击。

键在键盘上。

看看keyPress& keyDown活动



键盘事件| jQuery API文档 [ ^ ]

Hi !


I want to know what clicks on the browser(Chrome) triggers what action. 
When I press the A button on a page, I want to detect and record it. 
How can I do it ?  



What I have tried:

monitorEvents(document.body, "click");

解决方案

"Click"s refer to mouse clicks.
"Keys" are on the keyboard.
Look at the "keyPress" & "keyDown" events

Keyboard Events | jQuery API Documentation[^]


这篇关于我如何收听点击事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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