copy(){ const input = document.createElement('input') document.body.appendChild(input) input.setAttribute('value'," 你想要复制的内容 ") input.select() if (document.execCommand('copy')) { document.execCommand('copy') } document.body.removeChild(input) }
copy(){ const input = document.createElement('input') document.body.appendChild(input) input.setAttribute('value'," 你想要复制的内容 ") input.select() if (document.execCommand('copy')) { document.execCommand('copy') } document.body.removeChild(input) }