CS125 Spring 2014 Interim
The <form> tag attributes
• action: specifies the server-side program or script that will process your form data;
in other words, this attribute specifies where to send the form data when the form is
submitted
• method: specifies how to send the form data
– “get”: (default value) form data passed in URL
– “post”: form data passed in HTTP Entity Body (a little bit more secure)
• name: provides a way to reference the form in a script
• id: uniquely identifies the form
Now, we’ll consider in turn several form elements.
First, we’ll look at the <input> element, which accepts input from the user in a variety of
ways, depending on the value of its type attribute. For example, an input element can be
a text box, a checkbox, a password box, a radio button, a button, and more.
9-3