• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. JavaScript And Cookies > Showing Your Cookies

Showing Your Cookies

In the previous example, you read the value of one cookie from the server. Now you'll see how to write a script that reads all the cookies that came from your server and displays their names and values. If there are no cookies, the script says "There are no cookies here" ( Figure 10.5 ). If there are cookies, it displays a line per cookie showing what's in the cookie ( Figure 10.6 ). Script 10.3 shows you how.

Figure 10.5. If there are no cookies from the server your Web page is on, you'll see this result.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint