JavaScript Reference/Event Handlers Reference/onDragStart

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

"onDragStart" Example

   <source lang="javascript">
   

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

</script> </head> <body bottommargin=150>

Source object: <input id="sourceObject" size=50 value="The text to Drag" ondragstart="function1()">

Drop selected text into the following text field.

 Target object: 

<input id="targetObject" size=50 value="Drag destination element"> </body> </html>


     </source>
   
  


"onDragStart" is applied to

   <source lang="javascript">

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

| |
|

| |<body> <button> |

| |
|

| | | | |<custom>

| | | |

| |<dir>
| | |
document | | |
| | |<fieldset> | | |<form> <hn> | | |
|

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

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

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

        "onDragStart" Properties

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

        </source>



        "onDragStart" Syntax and Note

        <source lang="javascript"> Note:

        This event fires when the user starts a drag-and-drop operation on a selection in the document. For this event to fire, the object must support drag-and-drop.

        Syntax:


        </source>

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