OnMouseOver Attribute

Internet Development Index

Triggers a mouse event for a shape. Read/write String.

Applies To

Shape

Tag Syntax

<v:element onmouseover="expression">

Remarks

A "mouseover" event is generated when the mouse pointer is on the shape. The value is generated by using the keyword this (as a reference to the object) followed by the object model syntax. For example, to change the fill color to red, use the following:

onmouseover="this.fillcolor='red'"

Note the use of single and double quotation marks to set off the expression.

VML Standard Attribute

Example

When the mouse pointer is on the shape, the fill color will turn from red to green.

   <v:rect id=myrect fillcolor="red"
   style="position:relative;top:1;left:1;width:20;height:20"
   onmouseover='this.fillcolor="green"'>
   </v:rect>

OnMouseOver Attribute Example. (Requires Microsoft Internet Explorer 5 or greater.)