HTML | onmouseout Event Attribute

The onmouseout event attribute works when the mouse pointer moves out of the specified element.

Syntax:

<element onmouseout = "script">

Attribute value: This attribute contains single value script which works when mouse moves out from the element.

Supported Tags: This attribute is supported by all HTML elements except <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>.

Example: This example uses onmouseout event to display an alert message when mouse move out from the paragraph element.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html> 
<html
    <head
        <title>
            onmouseout Event Attribute
        </title
        <script
          
            /* Script run when onmouseout 
                     event call */
            function geeks() { 
                alert("Mouse move out"); 
            
        </script
    </head
      
    <body style = "text-align:center"
      
        <h2>
            onmouseout Event Attribute
        </h2
          
        <!-- onmouseout event call here -->
        <p onmouseout = "geeks()">
            Computer science portal
        </p
    </body
</html>                    

chevron_right


Output:
Onmouseout even output

Supported Browser:The browser supported by onmouseout Event Attribute are listed below:

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


My Personal Notes arrow_drop_up

All powers are within you You can do anything and everything Believe in that

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.