Forum Moderators: open
Do you know of an online tutorial that says how to do it? When I search Google for [javascript tutorial "remember me"], I just get a load of sites with a "remember me" tickbox on their own login form, not an explanation of actually how to do it!
If you're using Mozilla or one of its siblings, Tools - Cookie Manager - Manage Stored Cookies will allow you to view the cookies the browser has stored. Investigating that may help you to visualize the data and format of a cookie.
Basically, cookies are just text strings. document.cookie is a concatenated string that stores all the cookies for a domain. A domain may have 20 individual cookies, each no larger than 4K. To manipulate an individual cookie you assign document.cookie's value to a variable, then use a string search to find the specific cookie, then string parsing techniques to process it.
You should be aware that the latest implementations of the W3C's P3P policy have resulted in cookies becoming more restricted. You may wish to investigate creating a security policy for your site before you try setting cookies on users' machines. This is a good place to begin that oddessy, [p3ptoolbox.org...]