R
RC
<a href="#" onmousedown="callMyFunction()">Press the mouse button</a>
What I expect is when I or an user move mouse pointer over that link,
and press the mouse button. Then will "callMyFunction()" over and
over again until I release the mouse button (mouseup).
But what I found out the onmousedown is just acts the same as onclick.
It only "callMyFunction" once. If I want to call again, I need to
keep repeat mousedown, mouseup like clicking. That is not cool at all!
So The implementation for onmousedown in JavaScript is different from
mousePressed event in MouseListener interface in Java.
What I expect is when I or an user move mouse pointer over that link,
and press the mouse button. Then will "callMyFunction()" over and
over again until I release the mouse button (mouseup).
But what I found out the onmousedown is just acts the same as onclick.
It only "callMyFunction" once. If I want to call again, I need to
keep repeat mousedown, mouseup like clicking. That is not cool at all!
So The implementation for onmousedown in JavaScript is different from
mousePressed event in MouseListener interface in Java.