Copy to Clipboard with JavaScript – (also for hidden element)
In this trick, I’ll show you how you can copy to a clipboard with javascript. function copyToClipboard() { var copyText = document.getElementById(“myInputId”); copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ …