agregar mas de un valor en una cookie
Publicado por vlg (9 intervenciones) el 13/02/2004 19:21:44
HOLA , COMO AGREGAR UNA VALOR A UNA COOKIE YA LO SE MAS O MENOS DE ESTA MANERA
function mandarGalleta(nombre, valor, caducidad) {
document.cookie = nombre +"="+ escape(valor)
+ ((caducidad == null) ? "" : ("; expires=" + caducidad.toGMTString()))
alert(document.cookie)
}
function window_onload() {
var fecha=new Date (2004, 12, 31);
mandarGalleta("vicente=",25,fecha)
}
ESTO ME GRABA VICENTE=25 , PERO COMO PODRIA HACER QUE ME GRABASE MAS DE UNA VALOR , POR EJEMPLO , VICENTE=25,LOPEZ=26,ETC...
MUCHAS GRACIAS
function mandarGalleta(nombre, valor, caducidad) {
document.cookie = nombre +"="+ escape(valor)
+ ((caducidad == null) ? "" : ("; expires=" + caducidad.toGMTString()))
alert(document.cookie)
}
function window_onload() {
var fecha=new Date (2004, 12, 31);
mandarGalleta("vicente=",25,fecha)
}
ESTO ME GRABA VICENTE=25 , PERO COMO PODRIA HACER QUE ME GRABASE MAS DE UNA VALOR , POR EJEMPLO , VICENTE=25,LOPEZ=26,ETC...
MUCHAS GRACIAS
Valora esta pregunta


0