1. <textarea id="eins">Dieser Text wird kopiert oder?</textarea>
  2. <script>
  3. var ta = document.getElementById('eins');
  4. ta.select();
  5. ta.focus();
  6. document.execCommand('copy');
  7. </script>