禁止在当前页拖拽内容打开,禁止拖拽图片在新窗口打开-解决办法。
document.ondragover = function (e) { e.preventDefault(); }; document.ondrop = function (e) { e.preventDefault(); }; $(document).on("dragstart", function (e) { return false; });
http://websong.gitee.io/songyublog/