|
|
When the dragged data is dropped, a drop event occurs. In the example above, the ondrop attribute calls a function, drop(event): |
<script>
function drop(ev) {
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
</script>
Category: | Web Tutorial |
Sub Category: | HTML Drag and Drop API |
Uploaded by: | Admin |
Read Articlehttps://develop.horje.com/learn/1434/reference