Answers for "copy text from header tag in javacript"

0

copy text from header tag in javacript

function copyText() {
  var text = document.getElementById("myText").innerText;
  var elem = document.createElement("textarea");
  document.body.appendChild(elem);
  elem.value = text;
  elem.select();
  document.execCommand("copy");
  document.body.removeChild(elem);
}
Posted by: Guest on July-27-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language