document.onMouseUp

JavaScript1.0+, JScript1.0+ Nav2+, IE3+ Syntax

document.onMouseUp

Description

The onMouseUp event handler specifies what should happen when the mouse button is pressed and then released within the Document object.

Example

In Listing 7.153, the script in the <head> of the document specifies a function to handle all MouseUp events in the document. To be able to do this, the document's captureEvents() method is used to capture all events of type Event.MOUSEUP. When the mouse button is pressed and then released within the page, the document's event handler generates an alert box notifying the user of the event.

Listing 7.153 Handle the MouseUp Event with the onMouseUp Event Handler
 <html> <head> <script language="JavaScript1.2"> ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.