JavaScript 175 Bytes
Golfed:
HTML: 24 bytes
<input id="E" value="C"> JS: 151 bytes
function c(){ e=document.getElementById("E") e.select();document.execCommand('copy'); } document.getElementById("E").addEventListener("click", c) 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);