how to use clipboard javascript without downloading it code example
Example 1: how to access clipboard via js
navigator.clipboard.readText().then(clipText =>
document.getElementById("outbox").innerText = clipText);
Example 2: copy text to clipboard javascript
<script>
function copyToClipboard(element) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val($(element).text()).select();
document.execCommand("copy");
$temp.remove();
}
</script>
<p id="text">Hello</p>
<button onclick="copyToClipboard('#text')"></button>