JavaScript Reference/Event Handlers Reference/onBlur

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

"onBlur" Example

   <source lang="javascript">
   

<head> <script language="JavaScript">

  function function1() {
      window.open("http://www.wbex.ru", "", ""); 
  } 

</script> </head> <body>

  Press the Tab key to set focus on the link below.
<a id="myL" href="http://www.wbex.ru/" target=_blank onBlur="function1()"> wbex.ru </a> <a id="myL" href="http://www.wbex.ru/" target=_blank onBlur="function1()"> wbex.ru </a><a id="myL" href="http://www.wbex.ru/" target=_blank onBlur="function1()"> wbex.ru </a>
Now press the Tab key again to move focus to another element

</body>


     </source>
   
  


"onBlur" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | | |

| |
<button> | | |
|

| | <custom> | | |

| | | <dir> |

| |
|

| |

| | |<embed> <fieldset> | | | <form> | | |<frame> <frameset> |

| |<hn>
|

| | <iframe> | | |<img> <input type="button"> | | |<input type="checkbox"> <inputtype="file"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <isindex> | | | <label> |

| |<legend>
  • | | |<listing> <map> | | |<marquee> <menu> | | |<object>
      | | |<optgroup> <option> | | |

                               |
      |                |                                                       |
      |                |                                                     |
      |                |                          <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |                                                    |
      |                |                         <tbody>                       |
      |                |                          |
      |                |                                                       |
      |                |
        | | |window <xmp> | +----------------+--------------------------------------------------------------+ </source>

        "onBlur" Properties

        <source lang="javascript"> +----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |clientX clientY | | |ctrlLeft offsetX | | |offsetY screenX | | |screenY shiftLeft | | |srcElement type | | |x y | +----------------+--------------------------------------------------------------+

        </source>



        "onBlur" Syntax and Note

        <source lang="javascript"> Note:

        This event fires when the element loses focus.


        </source>

      <textarea> | | |<tfoot> | | |<thead>