No browser supports this attribute right now."/> No browser supports this attribute right now.">

Home  >  Article  >  Web Front-end  >  In HTML, how to set whether to copy, move or link when dragging and dropping data?

In HTML, how to set whether to copy, move or link when dragging and dropping data?

WBOY
WBOYforward
2023-09-06 23:17:02570browse

In HTML, how to set whether to copy, move or link when dragging and dropping data?

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

  • Copy - Drag-and-drop will create a copy of the dragged element.
  • Move - Dragging an element will move it to a new location.
  • Link - It creates a link to the drag data

Try the following to use the dropzone attribute in JavaScript -

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

Now No browser supports this attribute.

The above is the detailed content of In HTML, how to set whether to copy, move or link when dragging and dropping data?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete