Answers for "copy to clipboard button hide"

1

copy to clipboard button hide

<body>
    <button onclick="setClipboard('test')">Ativar Conexão</button>
    
<script>
function setClipboard(value) {
    var tempInput = document.createElement("input");
    tempInput.style = "position: absolute; left: -1000px; top: -1000px";
    tempInput.value = value;
    document.body.appendChild(tempInput);
    tempInput.select();
    document.execCommand("copy");
    document.body.removeChild(tempInput);
}
</script>
Posted by: Guest on January-23-2021

Code answers related to "copy to clipboard button hide"

Browse Popular Code Answers by Language