JavaScript Reference/Event Handlers Reference/onBlur

Материал из Web эксперт
Версия от 08:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"onBlur" Example

    
<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.<br>
   <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>   
   <br>
   Now press the Tab key again to move focus to another element
</body>



"onBlur" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <applet>                      |
|                |<area>                          <b>                           |
|                |<bdo>                           <big>                         |
|                |<blockquote>                    <button>                      |
|                |<caption>                       <center>                      |
|                |<cite>                          <custom>                      |
|                |<dd>                            <del>                         |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<font>                          <form>                        |
|                |<frame>                         <frameset>                    |
|                |<hn>                            <hr>                          |
|                |<i>                             <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">           |
|                |<ins>                           <isindex>                     |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<listing>                       <map>                         |
|                |<marquee>                       <menu>                        |
|                |<object>                        <ol>                          |
|                |<optgroup>                      <option>                      |
|                |<p>                             <pre>                         |
|                |<q>                             <rt>                          |
|                |<ruby>                          <s>                           |
|                |<samp>                          <select>                      |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |<sub>                           <sup>                         |
|                |<table>                         <tbody>                       |
|                |<td>                            <textarea>                    |
|                |<tfoot>                         <th>                          |
|                |<thead>                         <tr>                          |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |window                          <xmp>                         |
+----------------+--------------------------------------------------------------+



"onBlur" Properties

+----------------+--------------------------------------------------------------+
| Properties     |altKey                          altLeft                       |
|                |clientX                         clientY                       |
|                |ctrlLeft                        offsetX                       |
|                |offsetY                         screenX                       |
|                |screenY                         shiftLeft                     |
|                |srcElement                      type                          |
|                |x                               y                             |
+----------------+--------------------------------------------------------------+



"onBlur" Syntax and Note

Note:
    
This event fires when the element loses focus.