JavaScript Reference/Event Handlers Reference/onMouseEnter

Материал из Web эксперт
Перейти к: навигация, поиск

"onMouseEnter" Example

    
<head>
<script language="JavaScript">
    function function1(){
        alert("The "+event.type+" event fired") 
    } 
</script>
</head>
<body>
    <div id="myDiv" onmouseenter="function1()">
        Move the mouse over this div element area.
    </div>
</body>



"onMouseEnter" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <applet>                      |
|                |<area>                          <b>                           |
|                |<base>                          <basefont>                    |
|                |<bdo>                           <bgsound>                     |
|                |<big>                           <blockquote>                  |
|                |<body>                          <button>                      |
|                |<caption>                       <center>                      |
|                |<cite>                          <code>                        |
|                |<custom>                        <dd>                          |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<font>                          <form>                        |
|                |<hn>                            <hr>                          |
|                |<html>                          <i>                           |
|                |<img>                           <input type="button">         |
|                |<inputtype="checkbox">          <input type="file">           |
|                |<input type="image">            <inputtype="password">        |
|                |<input type="radio">            <input type="reset">          |
|                |<inputtype="submit">            <input type="text">           |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<listing>                       <map>                         |
|                |<marquee>                       <menu>                        |
|                |<nobr>                          <ol>                          |
|                |<p>                             <pre>                         |
|                |<rt>                            <ruby>                        |
|                |<s>                             <samp>                        |
|                |<select>                        <small>                       |
|                |<span>                          <strike>                      |
|                |<strong>                        <sub>                         |
|                |<sup>                           <table>                       |
|                |<tbody>                         <td>                          |
|                |<textarea>                      <tfoot>                       |
|                |<th>                            <thead>                       |
|                |<tr>                            <tt>                          |
|                |<u>                             <ul>                          |
|                |<var>                           <xmp>                         |
+----------------+--------------------------------------------------------------+



"onMouseEnter" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |button                          cancelBubble                  |
|                |clientX                         clientY                       |
|                |ctrlKey                         ctrlLeft                      |
|                |fromElement                     offsetX                       |
|                |offsetY                         returnValue                   |
|                |screenX                         screenY                       |
|                |shiftKey                        shiftLeft                     |
|                |srcElement                      toElement                     |
|                |type                            x                             |
|                |y                                                             |
+----------------+--------------------------------------------------------------+



"onMouseEnter" Syntax and Note

Note:
    
This event fires when the mouse pointer enters an object"s area.