JavaScript example illustrates the use of the onmouseover and onmouseout events:
<head> | |
<script type="text/javascript"> | |
function OnMouseIn (elem) { | |
elem.style.border = "2px solid blue"; | |
} | |
function OnMouseOut (elem) { | |
elem.style.border = ""; | |
} | |
</script> | |
</head> | |
<body> | |
<div style="background-color:#d0f0a0; width:200px" | |
onmouseover="OnMouseIn (this)" onmouseout="OnMouseOut (this)"> | |
Move your mouse pointer into and out of this element! | |
</div> | |
</body> I hope you like this program :D |
Comments