Código Javascript:
Ver original
var now = new Date(); var time = now.getTime(); time += 10 * 1000; now.setTime(time); ver(){document.cookie="username=John Smith;expires=now.toUTCString();path=/";}
<input type="button" onclick="ver();" value="xd">