One of JavaScript's greatest gifts is the ability to perform tasks that otherwise would require CGI programs and multiple trips to the server. Forms processing is a great example. Before JavaScript, all the logic for validating the form had to be contained in the CGI program itself, which meant a trip to the server whether or not the form had all its ducks in a row. I've mocked up a bug-report form for a new site as an example. The required fields are userName , email , url , priority , and department .
Radio buttons are a bit more complicated.
Inc. All rights reserved. Privacy policy .