var link = "https//www.test.com/shared?key=" + shareddata;
const input = document.createElement('input');
document.body.appendChild(input);
input.setAttribute('value', link);
input.select();
if (document.execCommand('copy')) {
document.execCommand('copy');
layer.msg("复制成功,请手动分享链接")
}
document.body.removeChild(input);
html将内容复制到剪贴板
最新推荐文章于 2023-12-13 16:33:18 发布