JavaScript Reference/Javascript Methods/dragDrop

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

"dragDrop()" Example

   <source lang="javascript">
  

<html> <body> <script language="JavaScript"> function function1() {

   document.all.sourceObject.dragDrop()
   var m = document.all.sourceObject.dragDrop()
   alert(m+".\nDrag operation is not yet completed") 

} </script>

<input id="sourceObject" size=50 value="The (whole or part) text to drag">

Drop selected text into the following text field.

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

</body> </html>


     </source>
   
  


"dragDrop()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <area> | | |<basefont> <bgsound> | | |<body>
| | |<button> | | |<col> <comment> |

| |
|

| |

<embed> | | | <form> | | |<frame> <head> |

| |
<html> |

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

| |
  • <map> | | |<marquee> <meta> | | |<object>
      | | |<option>

      | | |<script> <select> | | | <style> | | |

        | +----------------+--------------------------------------------------------------+ </source>

        "dragDrop()" Syntax, Parameters and Note

           <source lang="javascript">
        

        Note: Starts a drag-and-drop operation. Returns true (successful) or false (failed).

        Syntax:

        document.all.elementID.dragDrop()


        </source>
      |

      | |<textarea> <title> |

      | |

  • Источник — «http://wbex.ru/index.php?title=JavaScript_Reference/Javascript_Methods/dragDrop&oldid=7577»