Skip to content
Related Articles

Related Articles

Improve Article
HTML | DOM onmouseover event
  • Last Updated : 30 Jul, 2019

The DOM onmouseover event in HTML occurs when the mouse pointer is moved onto an element or its children.


  • In HTML:
    <element onmouseover="myScript">
  • In JavaScript:
    object.onmouseover = function(){myScript};
  • In JavaScript, using the addEventListener() method:
    object.addEventListener("mouseover", myScript);


<!DOCTYPE html>
      DOM onmouseover event
        <h1 id="hID">
          HTML DOM onmouseover event
              "mouseover", over);
              "mouseout", out);
            function over() {
                  "hID").style.color = "green";
            function out() {
                  "hID").style.color = "black";


Supported Browsers: The browsers supported by HTML DOM onmouseover event are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :