Skip to content
Related Articles

Related Articles

HTML | DOM onmouseout Event

Improve Article
Save Article
Like Article
  • Last Updated : 04 Aug, 2021

The HTML DOM onmouseout event occurs when the mouse pointer is moved out of an element or its children.
Supported Tags: It supports All HTML elements, EXCEPT:

  • <base>
  • <bdo>
  • <br>
  • <head>
  • <html>
  • <iframe>
  • <meta>
  • <param>
  • <script>
  • <style>
  • <title>


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

Example: Using the addEventListener() method 


<!DOCTYPE html>
    <title>DOM onmouseout Event</title>
        <h1 id="hID">
      <h2>DOM onmouseout Event</h2>
                "mouseover", over);
                "mouseout", out);
            function over() {
                    "hID").style.color = "green";
            function out() {
                    "hID").style.color = "black";


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

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


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!