Javascript : drag and drop image tag

。_饼干妹妹 提交于 2019-12-11 03:51:38

问题


I wanted to know how to do a drag and drop image tag using javascript. I know html5 each element can be dragged but I wanted to make it work on older browser. I have made the drag and drop using javascript and it worked fine except in ie and firefox when mouse down, the mouse move event didn't react unless the user click it, and that is the reaction of ie. On firefox, the image got changed to semi-transparency and draggable but my code that dragging it.

Can anyone know how to solve this problem ? please help.


回答1:


Have you tried jQuery yet? with the addon jQuery ui you can drag and drop every object on a website.. jQuery UI: draggable



来源:https://stackoverflow.com/questions/12036136/javascript-drag-and-drop-image-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!