0
我使用的是我在Chrome資源文件(chrome://resources/js/util.js)中找到的此功能,並且在Google Chrome上運行良好。取消拖動和選擇事件
/**
* Disables text selection and dragging.
*/
function disableTextSelectAndDrag() {
// Disable text selection.
document.onselectstart = function(e) {
e.preventDefault();
}
// Disable dragging.
document.ondragstart = function(e) {
e.preventDefault();
}
}
我想在Internet Explorer 8中取消這個事件,但是這不起作用。
如何在IE8中取消此事件?