<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Cookies</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Stone's WebWriter 4">
<script language="javascript" type="text/javascript">
function skrivCookie(name,value,expTime,path){//Tid i dage
switch(skrivCookie.arguments.length){
case 1:
var expTime = 0;
var path = "/";
case 2:
var expTime = 0;
var path = "/";
case 3:
var path = "/";
}
var exp = new Date().getTime()+expTime*24*60*60*1000;
exp = new Date(exp).toGMTString();
var cook = name + " = " + escape(value) + ";expires=" + exp + ";path=" + path;
document.cookie = cook;
}
function hentCookie(name){
if (document.cookie){
var n = document.cookie.indexOf(name+"=");
if (n>-1){
var val = document.cookie.substring(n+name.length+1);
n = val.indexOf(";");
if(n>-1)val=val.substring(0,n);
return unescape(val);
}
}else return null;
}
if(hentCookie('forside'))location.href = hentCookie('forside') + ".html";
</script>
</head>
<body>
<a href="linkA.html" onclick="skrivCookie('forside','linkA',365)">Brug link A som forside</a><br>
<a href="linkB.html" onclick="skrivCookie('forside','linkB',365)">Brug link B som forside</a>
</body>
</html>
-- og tallet 365 betyder så, at cookien holder i et år, den kan du frit lave om !-)