Event handler for Button, Document,
code whenever the user releases the mouse button. It uses the following
properties of the Event object:
type - indicates the type of event.
target - indicates the target object to which the event was sent.
layerx, layerY, pageX, pageY, screenX, screenY
indicate the cursor position at the time of the MouseUp
which - represents 1 for a left-mouse-button up, and 3 for a
modifiers - indicates any modifier keys held down when the MouseUp
For example, with the following code, the user can click on the word
'green' to alter the background color to green. Releasing the mouse
calls the 'changeColor' function to do this:
<P>Click on <B><A onMouseUp="changeColor()">
green</A></B> to change background color.</P>
When an OnMouseUp returns false, such as over an armed link (a MouseDown
over a link causes it to become armed), the default action is canceled.
This also happens with a MouseUp over an unarmed link. To illustrate
this, the following example assumes that a particular link 'lostLink'
is no longer available, so when the user clicks on that link, the release
of the mouse button calls the 'myAlert' function and causes the link
not to be triggered.
<P>Go to <A href="lostLink.html" onMouseUp="myAlert()">MyLink</a>.