xxxxxxxxxx
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
copyText.setSelectionRange(0, 99999);
navigator.clipboard
.writeText(copyText.value)
.then(() => {
alert("successfully copied");
})
.catch(() => {
alert("something went wrong");
});
}