What is this? From this page you can use the Social Web links to save Lectura de cookie en JavaScript to a social bookmarking site, or the E-mail form to send a link via e-mail.

Social Web

E-mail

E-mail It
September 15, 2009

Lectura de cookie en JavaScript

Posted in: JavaScript

Lectura de cookie en JavaScript

// Lectura de cookie
function readCookie(name)
{
  var ca = document.cookie.split(';');
 
  var nameEQ = name + "=";
  for(var i=0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1, c.length); //delete spaces
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
 
    }
  return null;
}

gentileza de @NelsonCuevas

fuente http://www.yourhtmlsource.com/javascript/cookies.html


Return to: Lectura de cookie en JavaScript

//