前端页面点击 复制 内容--只要能获取到值就可以

handler: function () {

var clipBoardContent = aaa;//这个就是你要复制的值
var $temp = $("<input>");
$("body").append($temp);
$temp.val(clipBoardContent).select();
document.execCommand("copy");
$temp.remove();
this.shareCopyFlag = true;
alert('地址复制成功!');
_this = this;
setTimeout(function () {
_this.shareCopyFlag = false
}, 1000)
}

posted @ 2021-01-14 15:31  孤者何惧`  阅读(209)  评论(0)    收藏  举报