【工具箱】复制进剪切板

private copyInClipper(txt) {
    let copy = document.createElement("input");
    copy.value = txt;
    document.body.appendChild(copy);
    copy.select();
    copy.setSelectionRange(0, copy.value.length), document.execCommand('Copy');
    document.body.removeChild(copy);
}

然后粘贴
还有其他js方法.https://www.cnblogs.com/tylerdonet/p/4533782.html

posted @ 2019-08-01 19:15  HarrickHeng  阅读(108)  评论(0)    收藏  举报