In HTML5Page DevelopmentIna very important point in the drag-and-drop operation is that we want to determine where the drag-and-drop event occurred. As the name implies, drag and drop events, that is, the removal (
[Open-source applications] Use HTTPHandler + resumableJs + HTML5 to drag and drop to upload [large] files,
Preface:
Transmission of large files has always been a major technical difficulty. When the file size is too large, it is unrealistic to submit all the content to the memory. There is also a problem with large files: whether resumable and multi-file simultan
external dragged file, returns a list of Fileslist, and fileslist a type property that returns the types of the fileOdiv.ondrop = function (EV) {Ev.preventdefault (); var fs = Ev.dataTransfer.files;Alert (fs.length)//alert (Fs[0].type)for (var i=0; I. length; i++) { if ( fs[i].type.indexof (' image ')! =-1) { //using the Returned Type property value string contains an image to determine the file typevar fd = newFileReader (); //Read file information Fd
This is a very creative html5svg chat box drag-and-drop elastic rocking animation effects. The user can use the mouse to click or swipe the specified area on the chat box, the area will be a very elastic spring effect to open the Chat user list. When you click on a profile picture, you switch to the chat screen with the same flex effect, and the avatar is moved to the top right corner of the chat screen. Th
1. AudioYour browser does not support the audio element.Insert prompt text for The 2. VideoYour browser does not support the video tag.The 3. Drag and Dropvar box1,box2,imgWindow.onload = function () {Box1 = document.getElementById ("Box1");Box2 = document.getElementById ("Box2");Box2.ondragstart = function (e) {Drag (e);}Box2.ondragover = function (e) {DragOver (e);}Box2.ondrop = function (e) {OnDrop (e);}
Note: links, images are draggable by default.The MouseMove will not be triggered during the entire drag-and-drop process.DragStart settings:e.datatransfer.effectallowed = "Move";E.datatransfer.setdata ("text", e.target.innerhtml);E.datatransfer.setdragimage (e.target, 0, 0);return true;Dragend settings:E.datatransfer.cleardata ("text");return false;DragEnter settings:return true;DragOver settings:E.preventd
Html5 supports multi-image preview upload and drag-and-drop controls,
An easy-to-use control was found during Image Upload. Multiple images can be uploaded at the same time. You can click and select an image or drag the image to the upload box for direct upload, which is convenient and easy to use, the interface is als
An object provided in the HTML5 standard for file input and output (I/O)File: represents a Document objectFileList: represents a list of files, class array objectsFileReader for extracting content from filesFileWrite is used to write a class tolerance to a file.These objects need to be accessed and retrieved through E.datatransfer in the H5
Feeling drag and pull is very interesting, just start playing, simple summary, there is nothing wrong place welcome correct, thank you for further updatesSimple summary of HTML5 drag and drop
of events:Ondragstart-ondrag-ondragenter-ondragover-ondragleave/ondrop-ondragendNote: 1. If you want to trigger the OnDrop event, you need to block the default event in OnDragOver (the element is not allowed to be placed by default).2. In Firefox 3.5+, if you drag and drop the image onto the drop target, the page will turn to the image file, and if you
Ondragover= "AllowDrop (event)" >Set elements to be dragged and droppedFirst, to make an element draggable, set the Draggable property to True:ondragstart= "Drag (Event)" Width= "336" height= ""/>HTML5 Drag and drop instance
Tencent Weibo has also been near implementation of drag and drop upload. It's actually very simple.
Because there is no server support in the article can not do upload demo, download the instance
what support is needed to drag and drop uploads
1: Browser support drop event
Reprinted please indicate the source: http://blog.csdn.net/lmj623565791/article/details/31513065
The previous article has implemented the overall HTML and CSS of this project:HTML5 CSS3 typical case: Drag and Drop upload of images without a plug-in (PreView and batch upload are supported) (1)
This blog is completed directly on the basis of the previous article. The final result is as follows:
1:
2:
Okay.
This is the effect: before dragging After:On the code:Daily sentence: I always knew looking back on the tears would make me laugh, but I never knew looking back on the laughs would make M E cry.I know that when I look back, those tears want to laugh, but I do not know how to look back, those laughter can also call me to tears.A drag-and-drop technique for sharing HTML5
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.