![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
26/06/2002, 12:34
|
| | Fecha de Ingreso: julio-2001 Ubicación: Internet
Mensajes: 1.690
Antigüedad: 23 años, 6 meses Puntos: 1 | |
Re: A ver si me pueden ayudar? Hola!,
Lo de la cookie lo puedes hacer:
Código:
<SCRIPT LANGUAGE="JavaScript">
<!--
function getCookie(name)
{
var cname = name + "=";
var dc = document.cookie;
if (dc.length > 0)
{
begin = dc.indexOf(cname);
if (begin != -1)
{
begin += cname.length;
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
}
}
return null;
}
function setCookie(name, value, expires, path, domain, secure)
{
document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : "; expires=" + expires.toGMTString()) + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain=" + domain) + ((secure == null) ? "" : "; secure");
}
//La Cookie Durara 90 Dias.
var duracion = 90;
var finalizacion = new Date();
//Lo Que Hacemos Es Establecer El Tiempo De Duracion De La Cookie.
finalizacion.setTime(finalizacion.getTime() + (duracion*24*60*60*1000));
//Obtenemos La Cookie
var visita = getCookie('visita')
//Si No Existe La Cookie
if(visita == null)
{
//Establecemos La Cookie Con Los Nuevos Valores(En Caso De No Existir, Se Establece Una Nueva)...
setCookie ('visita',"1",finalizacion);
}
else
{
//Ya ha visto la animacion, lo dirijimos a la siguiente pagina
location.href= "siguiente.htm";
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="javascript" SRC="http://www.galeon.com/jlmnetwork/firma.js"></SCRIPT> |