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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.