checking this sample. http开发者_运维百科://html5demos.com/drag
i was wonder how to get when You drop a < li >. (by href)
If I understand you correctly: You want to get the href attribute of the element being dropped? If so you can view source on that page and look on line 131.
var el = document.getElementById(e.dataTransfer.getData('Text'));
the el
element has an href
attribute so you can do: el.href
and that will give you the href you are asking for and in this case it will return html5demos.com/drag#
精彩评论