onmouseup Property

       

Returns or sets a Variant that represents the value associated with the onmouseup event. For example, the Variant can represent a macro or procedure call that executes when the event has occurred. Read/write.

expression.onmouseup

expression   Required. An expression that returns a DispFPHTMLDocument object.

Example

The following example, which appears embedded in the <head> section of an HTML document, displays a message to the user when the user releases the mouse button within the <p> element containing the onmouseup="DisplayMessage" attribute in the current page.

<head>
<title>onmouseup Example</title>
<script id=clientEventHandlersVBS language=vbscript>
<!--

Sub DisplayMessage
'Displays message to user

    MsgBox "This message is displayed when the user releases the mouse button within the <p> element section in the current document."

End Sub

-->
</script>
</head>

The <p> section code below calls the DisplayMessage procedure located in the <head> section of the document. When the user releases the mouse button within the <p> element in the document, a message will be displayed.

<body>
<p onmouseup = "DisplayMessage">Move the mouse over this sentence, depress a button and release it to view a message.</p>
</body>

The following line of code sets the  onmouseup attribute to the DisplayMessage procedure call. The index value zero (0) denotes the <p> tag as the only <p> element in the current page and the only <p> element in the all collection.

ActiveDocument.body.all.tags("p").item(0).onmouseup = "Display Message"