dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: How do I put a variable in a cookie?

  1. #1
    Join Date
    Mar 2010
    Posts
    701

    How do I put a variable in a cookie?

    I'm a beginner. I tried this:
    ...
    document.cookie =
    "var numberOpen=1; max-age=1800"
    ...
    numberOpen++
    ...

    Are there other ways?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Read & write cookies using correct methods.
    The cookie name is the name of the variable.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles