JavaScript Reference/Event Handlers Reference/onSelectStart

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

"onSelectStart" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript">

  function function1() {
    alert("The wbex.ru home page will open");
    window.open("http://www.wbex.ru","","") 

} </script></head> <body contenteditable=true>

  <a href="http://www.wbex.ru" 
     onselectstart="function1()">wbex.ru
  </a>

</body> <html>


     </source>
   
  


"onSelectStart" is applied to

   <source lang="javascript">

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

| |
|

| |<body>
| | |<button> |

| |
|

| | <custom> | | |

| | | <dir> |

| |
|

| |

| | |<fieldset> | | |<form> <hn> |

| |
|

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

| |
  • <listing> | | |<map> <marquee> | | |<menu> <nobr> | | |<object>
      | | |<option>

      | | |

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

        "onSelectStart" Properties

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

        </source>



        "onSelectStart" Syntax and Note

        <source lang="javascript"> Note:

        This event fires when an element or its contents are selected Selected means highlighted by dragging the mouse. To fire this event, <body>"s contenteditable attribute must be set to true.


        </source>

      |

      | |<textarea> <tfoot> |

      | |
      <thead> | | |