document.querySelector('button[id="copy"]').onclick = function(){ document.querySelector('textarea[id="msg"]').select(); document.execCommand('copy'); };
document.querySelector('button[id="copy"]').onclick = function(){ document.querySelector('textarea[id="msg"]').select(); document.execCommand('copy'); };