1
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
5 <title>Session cookie destination
</title>
6 <script type=
"text/javascript">
7 //Get cookie routine by Shelley Powers
8 function get_cookie(Name
) {
9 var search
= Name
+ "=";
11 if (document
.cookie
.length
> 0) {
12 offset
= document
.cookie
.indexOf(search
);
15 offset
+= search
.length
;
16 // set index of beginning of value
17 end
= document
.cookie
.indexOf(";", offset
);
18 // set index of end of cookie value
19 if (end
== -1) end
= document
.cookie
.length
;
20 returnvalue
=unescape(document
.cookie
.substring(offset
, end
))
27 document
.body
.style
.backgroundColor
=get_cookie("bgcolor")
31 <body onload=
"setcolor()">
32 This is the cookie destination page.