禁止在当前页拖拽内容打开,禁止拖拽图片在新窗口打开-解决办法。

document.ondragover = function (e) { e.preventDefault(); };
document.ondrop = function (e) { e.preventDefault(); };
$(document).on("dragstart", function (e) {
    return false;
});

  

posted @ 2017-07-28 17:42  宋宇  阅读(1507)  评论(0编辑  收藏  举报