The onmousemove
attribute event is triggered
when the mouse pointer is moving over an element.
None.
<element onmousemove="script or Javascript function name">
All HTML elements, EXCEPT:
<base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, <title>
|
Yes | Yes | Yes | Yes | Yes |
<!DOCTYPE html>
<html>
<body>
<!-- w w w . j a v a2 s . c om-->
<p id="p1" onmousemove="onmouseMove()" onmouseup="mouseUp()">
Click the text!
</p>
<script>
function onmouseMove() {
console.log("move");
}
function mouseUp() {
console.log("up");
}
</script>
</body>
</html>