Lecture 2011 10 17

Forms

The form element groups together input elements; the data the user enters is passed to the server (or can be 'passed' to Javascript code).

Between the <form> and </form>, you can place html tags (p, img, h1, etc).

Form tags:

<form>

A form groups input values, and specifies where to pass the input values.
HTML tags and content can be interspersed among the various kinds of inputs

Attributes:


action specifies where to pass form values:

Various event handlers. Here are some important ones for right now: method specifies how to send form-data. The form-handling code must receive the data in an expected way. The form-data can be sent as URL variables (method="get") or as HTTP post (use method="post")
See w3schools

Getting user data

Take a quick look at Bannerocity

Note the use of Javascript's object.innerHTML

Regular Expressions