|
| JAVASCRIPT ONMOUSEMOVE EVENT
The javascript onmousemove event handler is used to trigger a script or action when a mouse is moved while over an element. The onmousemove event calls the action from most elements.
Example:
<a href="#" onmousemove="alert('Jeepers! I\'ve been touched');">Touch this</a>
The above example will output Jeepers! I 've been touched when you move your mouse while on the link.
The onmousemove event can also call a function as follows:
<head>
<script type="text/javascript">
function touchme()
{
alert('Jeepers! I\'ve been touched');
}
</script>
</head>
<body>
<a href="#" onmousemove="touchme();">Touch this</a>
DEMO:
Move your mouse while on the link below to see the effect.
Touch this
See also:
|
|