我在窗口中添加了一些文本元素,在选择屏幕时,DOM 中的文本被选择如下
我已经提到了“pointer-events”:“all”,用于文本元素,但他不起作用。谁能建议一些方法
提前致谢
最佳答案
在 document.ready 中添加此代码
$('html').on("dragstart, selectstart",function(a){
this.stopPropagation()
this.find("*").andSelf().attr("unselectable","on");
});
关于javascript - 单击屏幕时,dom 中的文本会被选中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25967874/