cookie lesen
Danke BrainBug für die Antwort.Hier das Script.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Eckstein's Registrierung</TITLE>
<meta http-equiv="refresh" content="200;URL=history.go(-1)">
<script language="JavaScript">
<!--
function CookieLesen (Name) {
var dcookie = document.cookie;
var cname = Name+"=";
var clen = dcookie.length;
var cbegin = 0;
while (cbegin < clen) {
var vbegin = cbegin + cname.length;
if (dcookie.substring(cbegin, vbegin) == cname) {
var vend =dcookie.indexOf(";", vbegin);
if (vend == -1) vend = clen;
return unescape(dcookie.substring(vbegin, vend));
}
cbegin =dcookie.indexOf(" ", cbegin) + 1;
if (cbegin == 0) break;
}
return null;
}
//-->
</script>
</HEAD><BODY>
<script language="JavaScript">
<!--
if (CookieLesen("EcksteinsBenutzername") != null) {
document.write("Herzlich willkommen " + CookieLesen("EcksteinsBenutzername")+"!");
}
else
{
var UserName = CookieLesen("EcksteinsBenutzername");
}
UserName = CookieLesen("EcksteinsBenutzername");
document.write(UserName);
//-->
</script><br>
<a href="#" onClick="history.go(-1)"></a>
<input type=button value="Back" onClick="history.go(-1)">
</body>
</html>
Danke BrainBug für die Antwort.Hier das Script.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Eckstein's Registrierung</TITLE>
<meta http-equiv="refresh" content="200;URL=history.go(-1)">
<script language="JavaScript">
<!--
function CookieLesen (Name) {
var dcookie = document.cookie;
var cname = Name+"=";
var clen = dcookie.length;
var cbegin = 0;
while (cbegin < clen) {
var vbegin = cbegin + cname.length;
if (dcookie.substring(cbegin, vbegin) == cname) {
var vend =dcookie.indexOf(";", vbegin);
if (vend == -1) vend = clen;
return unescape(dcookie.substring(vbegin, vend));
}
cbegin =dcookie.indexOf(" ", cbegin) + 1;
if (cbegin == 0) break;
}
return null;
}
//-->
</script>
</HEAD><BODY>
<script language="JavaScript">
<!--
if (CookieLesen("EcksteinsBenutzername") != null) {
document.write("Herzlich willkommen " + CookieLesen("EcksteinsBenutzername")+"!");
}
else
{
var UserName = CookieLesen("EcksteinsBenutzername");
}
UserName = CookieLesen("EcksteinsBenutzername");
document.write(UserName);
//-->
</script><br>
<a href="#" onClick="history.go(-1)"></a>
<input type=button value="Back" onClick="history.go(-1)">
</body>
</html>
Kommentar