Using Forms and FramesSession 4... ► Using Forms and Common HTML Input Elements ► Using Frames... Introduction to Forms► Uses of Forms Collecting names, addresses, telephone numbers, e
Trang 1Using Forms and Frames
Session 4
Trang 2► Using Forms and Common HTML Input Elements
► Using Frames
Trang 3Introduction to Forms
► Uses of Forms
Collecting names, addresses, telephone numbers, e-mail addresses, and other information to register users for a service or event
Gathering information for the purchase of an item For example, if we want to purchase a book over the Internet, we would be required to fill in our name, mailing address, mode of payment, and so on
Trang 4A Sample Form
Trang 6HTML Input Element Attribute
► The INPUT Element
Trang 7Input –Type Attribute
Trang 8<INPUT TYPE=button VALUE=“” NAME=“button1" SIZE=20>
<INPUT TYPE=text VALUE=“” NAME="textbox" SIZE=20>
Trang 11► Submit
► RESET
► Image
Trang 12Other Input Elements-1
► The TextArea Element
Trang 13Other INPUT Elements-2
► The SELECT Element
Trang 14Select Element
<SELECT NAME="Experience" SIZE="3" >
<OPTION VALUE="1" SELECTED>1 year
<OPTION VALUE="2">1 - 3 years
<OPTION VALUE="3">None
</SELECT>
Trang 16<FORM action="http://somesite.com" method="post">
<INPUT type="radio" name="sex" value="Female"> Female<BR><BR><BR>
<BUTTON name="submit" value="submit" type="submit">
</BUTTON>
Trang 17Output
Trang 18► Frames divide a Web browser’s window into separate regions, each of which can display a separate scrollable page
► For example, we can use three frames in the Web page, one with a banner, one for the
navigation menu and one to display data
Trang 22Nested Frame sets
Trang 23Output
Trang 24The NOFRAMES Element