<script>
function myFunction(x) {
var copyText = document.(x).html();
copyText.select();
copyText.setSelectionRange(0, 99999);
document.execCommand("copy");
}
</script>
<button onclick="myFunction('ddd')">Kopyala</button>Şöybe Birşey yapmak İstedim ama Bir Türlü Yapamadım yapmak İstediğim function ile Gönderdiğim Değeri Panoya Kopyaşlmak İstesim Yarımcı Olur Musunuz
Javascript Kopyalama Kodu Hakkında Küçük yardım
3
●70
- 31-01-2021, 23:14:34
- 01-02-2021, 15:13:55
function cloneText(){ var copyText = document.getElementById("myInput"); copyText.select(); copyText.setSelectionRange(0, 99999) document.execCommand("copy"); alert("Copied the text: " + copyText.value); }<input type="text" id="myInput"/>
<input type="button" onclick="cloneText"/> - 01-02-2021, 16:13:32Teşşekkürler Hocam Bu Şekilde Her Alan için Bu Kodu Yazmam Gerek ben bunun Yerine Fonsyona Gonderılen Değer Ne İse Onu Kopyalasın İstiyorum o şekilde yapılamaz mı ?
Barbaros93 adlı üyeden alıntı: mesajı görüntüle