How to set whether the dragged data is copied, moved, or linked, when dropped in HTML?


Use the dropzone attribute to set whether the dragged data is copied, moved or linked.

  • Copy − The drop will create a copy of the dragged element.
  • Move − The dragged element will get moved to the new location.
  • Link − It creates a link to the dragged data       

Try the following to work with dropzone attribute in JavaScript −

<div dropzone="copy">
</div>

None of the browsers supports this attribute now.

Updated on: 29-May-2020

44 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements