Your IP : 216.73.217.87
<!DOCTYPE HTML>
<html lang="bg">
<head>
<meta charset="utf-8" />
<title>Пример за бисквитка</title>
</head>
<body>
<center>
<h1>
<script>
function getCookie(cname)
{
let name=cname+"=";
let decodedCookie=decodeURIComponent(document.cookie);
let ca=decodedCookie.split(';');
for(let i=0; i<ca.length; i++)
{
let c=ca[i];
while (c.charAt(0)==' ')
{
c=c.substring(1);
}
if (c.indexOf(name)==0)
{
return c.substring(name.length, c.length);
}
}
return "";
}
document.cookie="nmm=Калин; expires=Thu, 01 Jan 2025 00:00:00 UTC; path=/;";
let nm=getCookie("nmm");
if (nm!="")
{
document.write("Здравей, "+nm+"!");
}
else
{
document.write("Здравейте, приятели!");
}
</script>
</h1>
</center>
</body>
</html>