onclick add to clipboard code example
Example: 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: */
function SelfCopy(copyText)
{
navigator.clipboard.writeText(copyText);
alert("You just copied this: (" + copyText + ").");
}