鼠标拖拽,防止文字被选中

js:

window.getSelection? window.getSelection().removeAllRanges():document.selection.empty();

 加上这句话文字就不会被选中了

猜你喜欢

转载自blog.csdn.net/m0_46641774/article/details/126973497