GrandTabernacleAutoVI/public_html/js/cookies.js
2023-12-09 10:44:37 +01:00

10 lines
No EOL
354 B
JavaScript

function getCookie(name) {//Code from OpenClassroom
nom = name + "=";
var liste = document.cookie.split (';');
for (var i = 0; i < liste.length; i++) {
var c = liste[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nom) == 0) return c.substring(nom.length, c.length);
}
return null;
}