async function copy2Clipboard(id) { var copyText = document.getElementById(id); // copyText.select(); // copyText.setSelectionRange(0, 99999); // For mobile devices navigator.clipboard.writeText(copyText.innerHTML); var tooltip = document.getElementById(id+'-tip'); tooltip.innerHTML = "Kopyalandı! "; tooltip.style.display = 'inherit'; tooltip.style.color = 'green'; tooltip.style.fontSize = "smaller"; await new Promise(r => setTimeout(r, 2000)); tooltip.style.display= 'none'; }