Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #copy #text #input #button #click #js
ADD COMMENT
Topic
Name
8+9 =