<SCRIPT> function setCookie(name,
value, expires) { function getCookie(name)
{ if (begin == -1) return null; var end = document.cookie.indexOf(";", begin); if (end == -1) end = document.cookie.length; return unescape(document.cookie.substring(begin
+ prefix.length,
end)); function register(name)
{ expiration.setYear(expiration.getYear() + 1); setCookie("TheCoolJavaScriptPage",
name, expiration); </SCRIPT> <H1>Register Your Name with the Cookie-Meister</H1> <SCRIPT> var yourname = getCookie("TheCoolJavaScriptPage") // If yourname is not null then welcome
the user back with "Welcome ... if (yourname) document.write("Welcome
Back, ", yourname) document.write('<FORM
ONSUBMIT="return false">'); </SCRIPT> |