Skip to main content
8 of 9
Still Shaving off bytes.
TecBrat
  • 222
  • 1
  • 9

JavaScript 175 148 139 135 69 Bytes

Golfed:

<input value="c"onclick="this.select();document.execCommand('copy')"> 

Fiddle

Ungolfed

Got help from SitePoint

HTML:

<input style="display: none;" id="Empty" value="x"> <input id="clipclear" type="button" value="Clear The Clipboard"> 

JS:

function clearclip(){ empty=document.getElementById("Empty"); empty.style.display="block"; empty.select(); document.execCommand('copy'); empty.style.display="none"; } document.getElementById("clipclear").addEventListener("click", clearclip, false); 
TecBrat
  • 222
  • 1
  • 9