1 function copyItem() { 2 const input = document.createElement('input') 3 input.type = 'text' 4 input.value = '' 5 document.body.appendChild(input) 6 input.select() 7 document.execCommand("Copy") 8 document.body.removeChild(input) 9 },