js 复制链接内容
2021-01-26 14:16
阅读:712
标签:com activity round cli position value fun val and try { document.body.removeChild(textArea); js 复制链接内容 标签:com activity round cli position value fun val and 原文地址:https://www.cnblogs.com/xiaoyueya/p/13230430.html
var successful = document.execCommand(‘copy‘);
var msg = successful ? ‘成功复制到剪贴板‘ : ‘该浏览器不支持点击复制到剪贴板‘;
alert(msg);
} catch (err) {
alert(‘该浏览器不支持点击复制到剪贴板‘);
}
}
复制
评论
亲,登录后才可以留言!