码迷,mamicode.com
首页 > Web开发 > 详细

JS实现拖拽

时间:2015-05-11 20:13:53      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

HTML5 Drag and Drop

  • Make an Element Draggable

    <img draggable="true">
    
  • What to Drag - ondragstart and setData()

  • Where to Drop - ondragover

    By default, data/elements cannot be dropped in other elements. To allow a drop, we must prevent the default handling of the element.

    event.preventDefault()
    

JS实现拖拽

标签:

原文地址:http://my.oschina.net/guesswhoamI/blog/413408

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!