Chapter 7. PROVIDING AND RECEIVING INFORMATION WITH FORMS

So far I've shown you a few ways to get information from your visitors. You can ask questions with the prompt() function, and you can use onClick to tell when they click a link or onMouseOver to detect when they move over a link. In this chapter, you'll learn a plethora of ways to collect and display information using HTML forms and JavaScript. You can rely on forms and JavaScript to create very interactive sites that might include surveys and quizzes, calculators, games, and novel navigational tools.

In this chapter you'll learn how to:

  • Create HTML forms

  • Use JavaScript to read a form a visitor has filled out

  • Use JavaScript to fill out a form automatically

  • Use forms as navigational tools

Real-World ...

Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.