Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

onmouseover Property


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Returns or sets a Variant that represents the value of the onmouseover event. For example, the Variant can represent a macro or procedure call that executes when the event has occurred.

expression.onmouseover

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 positions the mouse over a <p> element containing the onmouseover="DisplayMessage" attribute in the current page.

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

Sub DisplayMessage
'Displays message to user

    MsgBox "This message is displayed when the user positions the mouse over the <p> element 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 positions the mouse over the <p> element in the document, a message will be displayed.

<body>
<p onmouseover = "DisplayMessage">Move the mouse over this paragraph to view a message.</p>
</body>

The following line of code sets the onmouseover 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).onmouseover = "Display Message"

Show:
© 2014 Microsoft