Вы находитесь на странице: 1из 13

Forms

Forms
What
Get

you can do with forms:

feedback Have a guestbook Take a survey See whos visiting you Sell stuff and much more!

Creating Text Boxes

<!DOCTYPE html PUBLIC-//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <meta http-equiv=content-type content=text/html;charset=utf-8 /> <title> TEXT BOX </title> </head> <body> Name: <input type="text" name="name" /> Address: <input type="text" name="adderess" /> <p> City: <input type="text" name="city" /> State: <input type="text" name="state" size="2" maxlength="2" /> Zipcode: <input type="text" name="zip" size="5" maxlength="2" /> </p> </body> </html>

Creating Password Boxes


The

only different between a password box and a text box is that whatever is typed in the former is hidden by bullets or asterisks The information is not encrypted when sent to the server

<title> TEXT BOX </title> </head> <body> Name: <input type="text" name="name" /> Address: <input type="text" name="adderess" /> <p> City: <input type="text" name="city" /> State: <input type="text" name="state" size="2" maxlength="2" /> Zipcode: <input type="text" name="zip" size="5" maxlength="2" /> Customer Code: <input type="password" name="code" size="8" /> </p> </body>

Creating Radio Buttons


You

can never push two buttons at once


<b>Size:</b> <input type="radio" name="size" value="K" />King <input type="radio" name="size" value="Q" />Queen <input type="radio" name="size" value="T" />Twin <input type="radio" name="size" value="S" />Single

Creating Checkboxes
Visitor

can check as many checkboxes in a set as they like

<p><b>Extras:</b> <input type="checkbox" name="extras" value="foot" />Footboard

<input type="checkbox" name="extras" value="drawers" />Drawers(for underneath <input type="checkbox" name="extras" value="casters" />Casters <input type="checkbox" name="extras" value="nosqueak" />Squeak proofing </p>

Creating Menu
Menu

are perfect for offering your visitors a choice from a given set of option
<b>Type of wood:</b> <select name="woodtype"> <option value="Mahogany">Mohagony</option> <option value="Maplewood">Maplewood</option> <option value="Pine">Pine</option> <option value="Cherry">Cherry</option> </select>

Creating Larger Text Area


More

room to write Unlike text boxes, text areas may be as large as your page Theyre prefect for eliciting questions and comments
Please share any suggestions or comments with us:

<textarea name="comments" rows="3" cols="65" wrap="wrap">Comments</textarea>

Creating the Submit Button


All

the information that your visitors enter wont be any good to you unless they send it to the server Submit button in forms visitor can deliver the information
<input type="submit" value="Order Bed" />

Resetting the Form


You

can give your visitors a reset button so that they can start over with a fresh form

<input type="reset" value="Reset" />

thank you

Вам также может понравиться