function copyUrl(url) {
let oInput = document.createElement('input');
oInput.value = url;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
oInput.className = 'oInput';
oInput.style.display = 'none';
}
原生js复制内容
最新推荐文章于 2022-01-12 14:35:29 发布