データをドロップすると、ドラッグしたデータのコピーになります:
<div dropzone="copy"></div>
dropzone 属性は、ドラッグしたデータを要素にドロップしたときに、それはコピーなのか、移動なのか、またはリンクなのかを指定します。
属性 | |||||
---|---|---|---|---|---|
dropzone | サポートなし | サポートなし | サポートなし | サポートなし | サポートなし |
dropzone 属性は、HTML5 で新しく追加されました。
<element dropzone="copy|move|link">
値 | 説明 |
---|---|
copy | Dropping the data will result in a copy of the dragged data |
move | Dropping the data will result in that the dragged data is moved to the new location |
link | Dropping the data will result in a link to the original data |
HTML チュートリアル:HTML Attributes
HTML チュートリアル:HTML5 Drag and Drop
JavaScript Reference: ondrag Event