Действия

Widget

Скопировать текст: различия между версиями

Материал из ВикиВоины

 
(нет различий)

Текущая версия на 15:02, 8 мая 2024

<button class="button text-copy-button" onclick="copyText()">Скопировать</button> <script> function copyText() {

   var textToCopy = document.getElementById("text-copy").innerText;
   navigator.clipboard.writeText(textToCopy)

} </script>