Skip to main content
1 of 9
TecBrat
  • 222
  • 1
  • 9

JavaScript Ungolfed I might come back and golf it later. Got help from SitePoint

HTML:

<input style="display: none;" id="Empty" value=""> <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