[js] 第658天 写一个方法实现选中复制的功能
Opened this issue · 1 comments
haizhilin2013 commented
yuandaishi commented
document.onmousedown=function(){
//console.log('xxxx')
document.onmousemove=function(){
//console.log(document.getSelection().toString());
navigator.clipboard.writeText(document.getSelection().toString())
}
}
document.onmouseup=function(){
document.onmousemove=null
}