在Internet Explorer中的HTML5拖放问题(无法访问dataTransfer属性)
- 论坛
- 在Internet Explorer中的HTML5拖放问题(无法访问dataTransfer属性)
6 浏览
在Internet Explorer中的HTML5拖放问题(无法访问dataTransfer属性)
我正在尝试使用HTML5实现基本的拖放功能。在Chrome中完全正常,但在IE10中,在setData
一行中出现了0x8000ffff - JavaScript runtime error: Unexpected call to method or property access.
的错误。
function handleDragStart(e) { e.dataTransfer.effectAllowed = 'move'; e.dataTransfer.setData("dropTarget", g.destination); } var cols = $("#" + g.source + " tbody > tr"); [].forEach.call(cols, function (col) { col.addEventListener('dragstart', handleDragStart, false); });
我做错了什么?