mouseover | onmouseover event

Fires when the user moves the mouse pointer into the object.

HTML 4.01 Specification, Section 18.2.3

Syntax

HTML Attribute <element onmouseover = "handler(event)">
Event Property object.onmouseover = handler;
addEventListener Method object.addEventListener("mouseover", handler, useCapture)

Event information

SynchronousNo
BubblesYes
CancelableYes

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

Remarks

The event occurs when the user moves the mouse pointer into the object, and it does not repeat unless the user moves the mouse pointer out of the object and then back into it.

Initiates any action associated with this event.

To invoke this event, do one of the following:

  • Move the mouse pointer into an object.

Examples

This example uses the onmouseover event to apply a new style to an object.


<p 
	onmouseover="this.style.color='red'" 
    onmouseout="this.style.color='black'">
    	Move the mouse pointer over this text to change its color. Move the pointer off the text 
        to change the color back.
</p>

This example shows how to change the value of a text area in response to mouse events.


<p>Move the mouse pointer into the text area to fire the onmouseover event. Move 
it out to clear the text.
<textarea name="txtMouseTrack" 
    onmouseover="this.value='onmouseover fired'" 
    onmouseout="this.value=''">
</textarea></p>

See also

a
abbr
address
area
audio
b
bdo
blockQuote
body
button
canvas
caption
cite
code
custom
dd
del
dfn
div
dl
document
dt
em
embed
fieldSet
form
hn
hr
i
img
input type=button
input type=checkbox
input type=email
input type=file
input type=image
input type=number
input type=password
input type=radio
input type=range
input type=reset
input type=search
input type=submit
input type=tel
input type=text
input type=url
ins
kbd
label
legend
li
map
menu
object
ol
p
pre
q
rt
ruby
s
samp
select
small
source
span
strong
sub
sup
SVGSVGElement
table
tBody
td
textArea
tFoot
th
tHead
tr
u
ul
var
video
window
Reference
onmousewheel
onmousedown
onmousemove
onmouseout
onmouseup
onmspointerhover
onmspointerover

 

 

Show:
© 2014 Microsoft