| <html> | |
| <head> | |
| <title>This page sets a cookie</title> | |
| <script type="text/javascript"> | |
| function makeCookie() | |
| { | |
| expireAt = new Date; | |
| expireAt.setMonth(expireAt.getMonth() + 3); | |
| username = "Good"; | |
| document.cookie = "name=" + username + ";expires=" + expireAt.toGMTString() | |
| } | |
| </script> | |
| </head> | |
| <body onLoad="makeCookie()"> | |
| </body> | |
| </html> |