<html> <body> <script language="JavaScript"> myDate = new Date('12/22/2005 12:00 AM'); document.cookie = 'firstName=Joe; expires=' + myDate.toString + ';'; </script> <button onclick="alert(document.cookie);">See Document Cookie</button> </body> </html>