我在寫一個拖放腳本。按住鼠標並沿着頁面移動它的問題是它開始選擇文本。我找到了一種方法來防止這種呼叫...Internet Explorer中的removeAllRanges()
var selection = window.getSelection();
selection.removeAllRanges();
...當移動鼠標。像往常一樣,我在使用Internet Explorer時遇到問題。有沒有相當於使這種方法在< IE9(無插件,純JavaScript)中工作?
提前致謝!
可能重複()不工作在IE中](http://stackoverflow.com/questions/5421892/getselection-not-working-in-ie) – 2014-10-08 17:21:48