Can someone tell me how to copy the result of a function to the clipboard?
After copying the result to the clipboard, I want to paste it after clearing the textarea.
function strReplace() {
var myStr = document.getElementById("source").value;
var newStr = myStr.replace(/м/g, "м")
.replace(/"/g, '"');
if(document.getElementById("source").value == '') {
alert("Textarea is empty!");
return false;
} else {
// Insert modified string in paragraph
document.getElementById("myText").innerHTML = newStr;
taErase();
document.getElementById('button').focus();
}
}