10 09/2014

native-drag-and-drop

最后更新: Wed Sep 10 2014 12:36:06 GMT+0800

例子1

可以拖动

例子2

events

  • dragstart
  • drag
  • dragenter
  • dragleave
  • dragover
  • drop
  • dragend

event.dataTransfer.effectAllowed

  • copy: A copy of the source item may be made at the new location.
  • move: An item may be moved to a new location.
  • link: A link may be established to the source at the new location.
  • copyLink: A copy or link operation is permitted.
  • copyMove: A copy or move operation is permitted.
  • linkMove: A link or move operation is permitted.
  • all: All operations are permitted.
  • none: the item may not be dropped.
  • uninitialized: the default value when the effect has not been set, equivalent to all.