Skip to content
Related Articles

Related Articles

Improve Article

HTML | onmousemove Event Attribute

  • Difficulty Level : Basic
  • Last Updated : 03 Dec, 2018

The onmousemove attribute works when the pointer moves over an element.


<element onmousemove = "script">

Attribute Value: This attribute contains single value script which works when onmousemove attribute called.


<!DOCTYPE html>
        <title>onmousemove event attribute</title>
        <h2>onmousemove event attribute</h2>
        <img onmousemove="bigSize(this)" onmouseout="normalSize(this)"
        border="1px solod black" src=
        alt="gfg" width="300" height="100">
            function bigSize(val) {
       = "200px";
       = "600px";
            function normalSize(val) {
       = "100px";
       = "300px";



Supported Browsers: The browser supported by onmousemove attribute are listed below:

  • Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :