JavaScript Reference/Event Handlers Reference/onControlSelect

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

"onControlSelect" Example

   <source lang="javascript">
   

<html> <body>

  You can edit the following controls.
  <input type=text 
         value="This is a text box" 
         oncontrolselect="alert("oncontrolselect for the text box fires!")">
  <button oncontrolselect="alert("oncontrolselect for the button fires!")">
  This is a button
  </button>

</body> </html>


     </source>
   
  


"onControlSelect" is applied to

   <source lang="javascript">

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

| |
<body> |

| |<button> |

| |
|

| |<custom>

| | | <dir> |

| |
|

| |document

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

| |
|

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

| |<legend>
  • | | |<listing> <marquee> | | |<menu> <object> | | |

      | | |

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

        "onControlSelect" Properties

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

        </source>



        "onControlSelect" Syntax and Note

        <source lang="javascript"> Note:

        This event fires when the user selects the element. The contenteditable attribute value must be true in the <container> element.

        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |