Posted By

abwaters on 06/07/09


Tagged

cookies


Versions (?)

List Cookies in Javascript


 / Published in: JavaScript
 

URL: http://www.arachna.com/edu/tutorials/mini/cookies/javascript.html

  1. function listCookies() {
  2. var theCookies = document.cookie.split(';');
  3. var aString = '';
  4. for (var i = 1 ; i <= theCookies.length; i++) {
  5. aString += i + ' ' + theCookies[i-1] + "\n";
  6. }
  7. return aString;
  8. }

Report this snippet  

You need to login to post a comment.