Vous êtes sur la page 1sur 3

Activity #18: Form <html> <head><title>Form</title></head> <body> <form method="POST" action="WEBBOT SELF"> <p><font face="Verdana">Last Name<input type="text" name="lname"

size="20"><br> First Name<input type="text" name="fname" size="20"><br> Nationality<select size="1" name="country"> <option value="Philippines">Philippines</option> <option value="USA">USA</option> <option value="Canada">Canada</option> </select><br> Gender: Male<input type="radio" value="V1" name="gender"> Female<input type="radio" value="V2" name="R1"><br> Sports:<br> <input type="checkbox" name="basketball" value="sports">Basketball <input type="checkbox" name="swimming" value="sports">Swimming </font></p> <p><font face="Verdana">Comments<br> <textarea rows="6" name="comments" cols="64"> </textarea><br> </font> </p> <p><input type="submit" value="Submit" name="B1"> <input type="reset" value="Reset" name="B2"></p> </form> </body> </html> Activity #19: Form 2 (password) <html> <head><title>Form 2</title></head> <body> <center> <font color="blue"> <h1>Form with password and hidden fields</h1> </center> </font> <form name="myform" action="mailto:clf_lu@yahoo.com method="post"> <input type="hidden" name="trackmyForm" value=""EMailMarketing"> <font color="red">Enter your password:</font><br> <input type="password" name="pass" size="12"><br> <font color="green">Thank you...Come again!</font><br> <input type="submit" value="Send it"> <input type="reset" value="Clear it"> </form>

</body> </html> Activity #20: Text Field <html> <head><title>Text fields</title></head> <body> <center><font color=blue><h1> A form using Text Fields</h1></center></font> <form name=myForm action=mailto:clf_lu@yahoo.com method=post> <font color=red> Enter your name:</font><br> First Name:<input type=text value="" name=firstName size=10> Middle Initial:<input type=text value=""size=1> Last Name:<input type=text value="" name=lastName size=10 maxlength=15><br><br> <font color=red>Enter your Address:</font><br><br> Address:<input type=text name=city size=20 maxlength=50> <br> State:<input type=text name=state size=10 maxlength=15> <br> Zip code:<input type=text name=zipcode size=5 maxlength=10><br> Country:<input type=text name=country size=10 maxlength=15><br> <font color=green>Thank you. Come again! </font><br> <input type=submit name=submitButton> <input type=reset name=resetButton> </form> </body> </html> Activity #21: Checkboxes <html> <head><title>Checkboxes</title></head> <body> <center><h1><font color=blue> A form using Checkboxes<h1></center> <form name=myForm action=mailto:clf_lu@yahoo.com method=post> <font color=red>Select your favorite food:</font><br> <input type=checkbox name=food value=pizza>Pizza &nbsp;&nbsp; <input type=checkbox name=food value=burger>Burger &nbsp;&nbsp; <input type=checkbox name=food value=salad>Salad<br><br> <font color=red>Select your favorite sports:</font><br> <input type=checkbox name=sports value=football>Football &nbsp;&nbsp; <input type=checkbox name=sports value=soccer>Soccer &nbsp;&nbsp;

1 <input type=checkbox name=sports value=tennis>Tennis<br><br> <font color=red>Select your favorite books:</font><br> <input type=checkbox name=books value=fiction>Fiction<br> <input type=checkbox name=books value=history>History<br> <input type=checkbox name=books value=fantasy>Fantasy <br><br> <font color=green>Thank you. Come again! </font><br> <input type=submit name=submitButton value=Send> <input type=reset name=resetButton value=Clear> </form> </body> </html> Activity #22: Radio Buttons <html> <head><title>Radio Buttons</title></head> <body> <center><h1><font color=blue> A form using Checkboxes<h1></font></center> <form name=myForm action=mailto:clf_lu@yahoo.com method=post> <font color=red>Check your Gender:</font><br> <input type=radio name=gender value=male>Male &nbsp;&nbsp; <input type=radio name=gender value=male>Femalebr><br> <font color=red>Check your college year:</font><br> <input type=radio name=year value=first>First &nbsp;&nbsp; <input type=radio name=year value=second>Second &nbsp;&nbsp; <input type=radio name=year value=third>Third&nbsp;&nbsp; <input type=radio name=year value=fourth>Fourth <br><br> <font color=red>Do you plan to go to school after graduation?</font><br> <input type=radio name=year value=yes>Yes<br> <input type=radio name=year value=no>No <br><br> <font color=green>Thank you. Come again! </font><br> <input type=submit name=submitButton value="Send"> <input type=reset name=resetButton value="Erase"> </form> </body> Activity #23: Menus <html> <head><title>Menus</title></head> <body> <center><h1><font color=blue> A Web page with a form using MENUS<h1></center></font> <form name=myForm action=mailto:clf_lu@yahoo.com method=post> <font color=red>Select your computer hardware needs:</font><br><br> <select name=compHardware multiple> <option>disk drive <option>More RAM <!--Note SELECTED means that external zip drive will be our default value--> <option selected>disk drive <option>External zip drive <option>New monitor <option>Faster printer <option>New mouse </select> <p> <font color=green>Thank You. Come again! </font><br><br> <input type=submit name=submitButton value=Send it> <input type=reset name=resetButton value=Clear it> </p> </form> </body> </html> Activity #24: Simple Frames <html> <head><title>Simple Frames</title></head> <frameset rows=50%,50%> <frame src=document1.html> <frame src=document2.html> <noframes> <body>Your browser does not display frames, Please read <a href=document1.html>Document One</a> <a href=document1.html>Document One</a> </body> </noframes> </frameset> </html> HTML code for document1.html: <html> <head><title>Document One </title></head> <body> <h1>Document One</h1> This is document one, which uses normal text colors. </body> </html> HTML code for document2.html: <html> <head><title>Document Two</title></head> <body bgcolor=black text=white> <h1>Document Two</h1> This is document two, which has white text on a black background.

1 </body> </html> Activity #25: 2 Column Frames 2-column frames.html page: <html> <head><title>2 Column Frames</title></head> <frameset cols=1*,3*> <frame src=navbar.html> <frame src=main.html> </frameset> </html> HTML code for navbar.html: <html> <head><title>navbar</title></head> <body bgcolor=black text=white> <h1>Primary Colors</h1> <ul><font color=red><li> Red <font color=yellow><li> Yellow<font color=blue><li> Blue <font color=white><li> Main Frame</ul> </body> </html> HTML code for main.html: <html> <head><title>main</title></head> <body bgcolor=green text=white> <h1>Red, Yellow, Blue</h1> Click on the word in the left navigation frame to load a new page into this right main frame. </body> </html> Activity #26: Nested Frames <html> <head><title>Nested Frames</title></head> <frameset cols=*,* > <frameset rows=*,*> <frame src=Frame1.html noresize> <frame src=Frame2.html noresize> </frameset> <frame src=Frame3.html noresize> </frameset> </html> HTML code for Frame1.html <html> <head><title>Frame 1</title></head> <body> <font color=blue><h2>Hello from Frame 1</h2></font> </body> </html> HTML code for Frame2.html <html> <head><title>Frame 2</title></head> <body> <font color=red><h2>Hello from Frame 2</h2></font> </body> </html> HTML code for Frame3.html <html> <head><title>Frame 3</title></head> <body> <font color=green><h2>Hello from Frame 3</h2></font> </body> </html>

Vous aimerez peut-être aussi