在双击函数中加入这一段代码就可以 window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();