Answers for "copy to clipboard onclick"


onclick add to clipboard

//U need to have a button with the id the same as its name because it is going to be sent to the clipborad.
/*Like this: */
<button onClick="SelfCopy("  id="1">1</button>
<button onClick="SelfCopy("  id="2">2</button>
<button onClick="SelfCopy("  id="3">3</button>

function SelfCopy(copyText)
      alert("You just copied this: (" + copyText + ").");
Posted by: Guest on April-24-2021

javascript copy to clipboard

var copyTextarea = document.getElementById("someTextAreaToCopy");; //select the text area
document.execCommand("copy"); //copy to clipboard
Posted by: Guest on July-22-2019

jquery copy to clipboard

Posted by: Guest on April-05-2020

Code answers related to "copy to clipboard onclick"

Code answers related to "Javascript"

Browse Popular Code Answers by Language