First, drag and drop APIWEB Drag and drop-On desktop applications, you can drag and drop elements from one location to another, but on the web, developers do not have a standard technology to do this, so it is not easy to implemen
Comments: Drag (Drag/Drop) is a very common function, you can grasp an object and Drag it to the area you want to place; in HTML5, Drag (draganddrop) it becomes a standard operation and is supported by any element. Because this fu
HTML5 authoritative guide-new tag changes, file API, drag-and-drop API (brief study note 1 ),1. More semantic tag Elements2.The content type is still "text/html"The extension is still html or htm.3. Omit quotation marksIn HTML5, w
This chapter explains how to use the file API and the drag-and-drop API in HTML 5. HTML5 's file API, which allows you to directly display information about a client file or the contents of a file in a browser, and
HTML5 adds an API for drag-and-drop, which allows any element of an HTML page to become draggable by using a drag-and-drop mechanism to develop a more user-friendly interface for human-computer interaction.A
("Text", ev.target.id);Panax Notoginseng } - the functionDrop (EV) { + //do not perform default processing (Deny drag and drop) A Ev.preventdefault (); the //use GetData () to get the data, and then assign the value to the + varData=Ev.dataTransfer.getData ("Text"); - //use the AppendChild method to place the dragged node in the element node as his child node $ Ev.
The new generation of Web development standard HTML 5 can bring far beyond its own ability as a markup language, in addition to our previous introduction of HTML 5 can perfectly support video audio elements, but also provide some powerful scripting tools, responsible for overseeing the HTML5 development process of the Organization, Just published a draft specification for the document Operations API,
Before HTML5, if you want to implement drag-and-drop effect, generally use MouseDown, MouseMove and MouseUp three events to simulate the drag-and-drop effect, more trouble. The HTML5 specification realizes the primary
DataTransfer object: The medium that the object is used to pass, used generally as event.datatransfer.
Draggable Property: is the label element to set the draggable=true, otherwise there will be no effect, for example:
Ondragstart Event: An event that is triggered when a drag element starts being dragged, and this event acts on the dragged element
OnDragEnter Event: An event that fires when a dragged element enters the target element, which acts
HTML5, however, according to the browser support shown in Findmebyip, Ie6~ie8 are drag Drop API (see below).Internet Explorer 6~9, Firefox, Opera 12, Chrome, and Safari 5 support drag and drop.Note: Drag-and-
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.