Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

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

Hour 5. Using Variables and Functions > Workshop: Storing User Data in Variable...

Workshop: Storing User Data in Variables

One common use of variables is to store information that comes from the user. As an example, you will now create a script that prompts the user for information and creates an HTML document containing that information.

In this script, we'll create a customized home page for the user. (It won't be a good one, but it will be customized.) You will use the prompt function to prompt for each piece of information. This function is similar to alert, but prompts the user for an entry.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint