The drag and drop method lies in the possibility.  Drag and drop technology.  Full mousemove code

The drag and drop method lies in the possibility. Drag and drop technology. Full mousemove code

HTML Drag and Drop interfaces enable applications to use drag-and-drop features in browsers. The user may select draggable elements with a mouse, drag those elements to a droppable element, and drop them by releasing the mouse button. A translucent representation of the draggable elements follows the pointer during the drag operation.

For web sites, extensions, and XUL applications, you can customize which elements can become draggable, the type of feedback the draggable elements produce, and the droppable elements.

This overview of HTML Drag and Drop includes a description of the interfaces, basic steps to add drag-and-drop support to an application, and an interoperability summary of the interfaces.

Drag Events

event On Event Handler Fires when…
drag ondrag …a dragged item(element or text selection) is dragged.
dragend ondragend …a drag operation ends (such as releasing a mouse button or hitting the Esc key; see Finishing a Drag .)
dragenter ondragenter …a dragged item enters a valid drop target. (See Specifying Drop Targets .)
dragexit ondragexit …an element is no longer the drag operation's immediate selection target.
dragleave ondragleave …a dragged item leaves a valid drop target.
dragover ondragover …a dragged item is being dragged over a valid drop target, every few hundred milliseconds.
dragstart ondragstart …the user starts dragging an item. (See Starting a Drag Operation .)
drop drop …an item is dropped on a valid drop target. (See Performing a Drop.)

Note: Neither dragstart nor dragend events are fired when dragging a file into the browser from the OS.

Interfaces

The basics

This section is a summary of the basic steps to add drag-and-drop functionality to an application.

identify what is draggable

Making an element draggable requires adding the draggable attribute and the ondragstart global event handler, as shown in the following code sample:

This element is draggable.

For more information, see:

handle the drop effect

The handler for the drop event is free to process the drag data in an application-specific way.

Typically, an application uses the getData() method to retrieve drag items and then process them accordingly. Additionally, application semantics may differ depending on the value of the

Where GUI elements are implemented using pseudographics) using the mouse or touch screen.

The method is implemented by "capturing" (by pressing and holding the main ( first, more often the left) mouse button) of an object displayed on the computer screen, programmatically available for such an operation, and moving it to another place (to change the location) or “throwing” it onto another element (to call the corresponding action provided by the program). In relation to windows (also capable of being moved in a similar way), this term is usually not used.

The basic actions and the simplest examples of drag-and-drop actions are: moving an object, moving an object from panel to panel, although drag-and-drop is widely used in modern operating systems and is one of the main ways to interact with a computer in a graphical interface user.

The following interface elements can be objects for moving: Desktop icons (icons), floating toolbars, program shortcuts in the Taskbar (starting with Win XP), TreeView elements, text string, DataGridView cell., also OLE elements. Objects can move both within a certain area, within one window, between panels of one window, and between different windows.

The drag event must be triggered by some user action. Most often, this action is a left mouse button press on an element (this event is called MouseDown), which can be moved in its container. Some components have their own drag-n-drop start events - for example, the TreeView has an ItemDrag event.


Wikimedia Foundation. 2010 .

See what "Drag-and-drop" is in other dictionaries:

    drag and drop- 〈[ dræg ənd drɔ̣p] n.; ; unz.; EDV〉 das Anklicken eines Objektes, das auf dem Computerbildschirm (in eine andere Datei bzw. an eine andere Stelle) verschoben u. dort wieder losgelassen wird [engl. drag „ziehen“ + and „und“ + drop „fallen… … Universal-Lexikon

    A form of performing any actions in graphical user interfaces, which involves the use of a computer mouse. Translated from English means literally: drag and drop. The action is performed by operating on the visible on the screen ... ... Glossary of business terms

    drag and drop- (computing) To move an icon, file, etc across the screen using a mouse and release it in a different place (dragˈ and dropˈ adjective) Main Entry: drag … Useful english dictionary

    drag and drop- IT to move something from one area of ​​a computer screen to another using the mouse: »The software allows you to drag and drop elements for the page images, text, etc. anywhere you want. Main Entry: drag … Financial and business terms

    drag-and-drop- UK US verb n.; Gen.: ; Pl.: unz.; EDV〉 das Anklicken eines Objektes, das auf dem Computerbildschirm (in eine andere Datei bzw. an eine andere Stelle) verschoben u. dort wieder losgelassen wird)