what is the difference between onClick and mouseClick?

我只是一个虾纸丫 提交于 2019-12-12 04:00:06

问题


wondering what is the major difference between these two: onClick and mouseClick..


回答1:


Assuming that you're talking about Java, the difference is right there in the documentation for MouseEvent:

Mouse Events

* a mouse button is pressed
* a mouse button is released
* a mouse button is clicked (pressed and released)
* the mouse cursor enters the unobscured part of component's geometry
* the mouse cursor exits the unobscured part of component's geometry

If you're talking about JavaScript, I'm going to assume that it's the difference between old style and new style event handling. But I've only ever used onClick, so can't give a definitive answer.




回答2:


Looks like you are confusing Java with Javascript. There is not onClick() method on Java APIs.



来源:https://stackoverflow.com/questions/1722029/what-is-the-difference-between-onclick-and-mouseclick

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!