saludos
mi cod es este...
Código:
function Cookie(name) { this.$name = name; //document.cookie = "uncookie=" + encodeURIComponent("Caracteres prohibidos: ; , "); var time= document.cookie=";max-age=60;"; document.cookie=name + time; if (name == null){ return; } alert(this.$name); } Cookie.prototype.store(secToLive) { this.$secToLive = secToLive; //var tiempoCo = document.cookie = secToLive; alert(this.$secToLive); alert(secToLive); } var objeto = new Cookie("Pedro"); objeto.store(10);