Answers for "how to copy text in a button in javascript"

0

how to copy text from input through button click js

function copyToClipboard(element) {
  var $temp = $("<input>");
  $("body").append($temp);
  $temp.val($(element).text()).select();
  document.execCommand("copy");
  $temp.remove();
}
Posted by: Guest on February-21-2021

Code answers related to "how to copy text in a button in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language