首页 > Web开发 > 详细

JS实现拖拽

时间:2015-05-11 20:13:31      阅读:332      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!