html forms chapter 9 pp 147-180. basic form join our email list name: email:

Post on 21-Jan-2016

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

HTML FormsChapter 9 pp 147-180

Basic Form<form action="/mailinglist.php" method="post”><fieldset> <legend>Join our email list</legend>

<label for="firstlast">Name:</label> <input type="text" name="username” id="firstlast”>

<label for="email">Email:</label> <input type="text" name="email" id="email”>

<input type="submit" value="Submit”></fieldset></form>

Server-side Scripting LanguagesPHP (.php) open source scripting language that

comes with the Apache web server.

Microsoft’s ASP.NET (Active Server Pages) (.asp) comes with Internet Information Server (IIS).

Ruby on Rails: programming language that is used with the Rails platform. Many popular web applications are built with it.

JavaServer Pages (.jsp) is a Java-based technology similar to ASP.

Python is another popular scripting language

The method attribute

method=“get”

Passes form data via the URL

Form Data

URL

The name attributemethod=“post”

Passes form data “inside” the http request

Only the server can see the data

The name attribute<textarea name="comment" rows="4"

cols="45" placeholder="Leave us a comment."></textarea>

When a user enters a comment in the field (“This is the best band ever!”), it would be passed to the server as a name/value pair like this:

comment=This%20is%20the%20best%20band%20ever%21

Text field vs. Text area Fields are single line

<input type=“text” …

Areas can be multiple lines

<textarea>…</textarea>

row

col

Password

Content specific inputs

Datalists

Buttons

Radio buttons

Pull-down or Drop-down menus Uses two HTML tags

<select><option>

<select>

<option>Volvo</option>

<option>Saab</option>

<option>Opel</option>

<option>Audi</option>

</select>

Multiple section optionsThe size attribute changes the drop-down to

a scrollable menu

The multiple attribute lets you select more than one option (hold the SHIFT or CTRL key)

Multiple section options

Menu Grouping

File Select (Browse)

HTML 5Date and Timehttp://www.w3schools.com/html/html5_form_input_types.asp

HTML 5Chapter 10 StuffScalable Vector Graphics

http://www.w3schools.com/svg/svg_rect.asp

top related