Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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);
}
 
PREVIOUS NEXT
Tagged: #copy #text #header #tag #javacript
ADD COMMENT
Topic
Name
4+3 =