【发布时间】:2009-11-12 13:00:00
【问题描述】:
想知道这两者之间的主要区别是什么:onClick 和 mouseClick..
【问题讨论】:
-
你问的是Java还是Javascript?
-
Java,我只是混淆了这两者。
想知道这两者之间的主要区别是什么:onClick 和 mouseClick..
【问题讨论】:
看起来您将 Java 与 Javascript 混淆了。 Java API 上没有 onClick() 方法。
【讨论】:
假设您在谈论 Java,区别就在 MouseEvent 的 documentation 中:
鼠标事件
* 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
如果您在谈论 JavaScript,我会假设这是旧样式和新样式之间的区别event handling。但是我只用过onClick,所以不能给出肯定的答案。
【讨论】: