Making a Cookie
userName = "Spiff Goodman";
expire = new Date(7, 11, 2001);
document.cookie = "userName="+userName+";expires=" + expire.toGMTString()
-
Use the cookie attribute of the document object.
-
Write data as name = value
-
expires is the date/time the cookie expires.
-
That's it!
See if a Cookie Exists
Home
Internet II: Day 4