USA 2017
"Lesson 16." - Forms: The <select> Element.
USA2017 :: "Lesson 16." - Forms: The <select> Element.
I searched all day along and finally found out all I need on USA2017.
/From the "Feedback collection on USA2017.INUMO.RU", USA2017.INUMO.RU./
Forms: The <select> Element. Lesson 16. The <select></select> element defines a drop-down list. The <option> elements defines the options to select. The list will normally show the first item as selected. You can add a selected attribute to define a predefined option. The <select> element must have attribute name. Attribute name is a name of variable to pass to a form-handler. Attribute checked set <option> is chosen at first. Attribute size of <select> element sets how many <option> elements will be shown. If attribute size is omitted then only 1 element will be shown. The multiple attribute is a boolean attribute. When present, it specifies that the user is allowed to enter more than one value in the <select> element. To mark option use combinations: CTRL-left mouse button and SHIFT-left mouse button.
Basic difference of <select> from lists is that in case of <select> elements an user can make a choice and pass it to a form-handler.
Each element is concluded into pair of <option></option>.
There are following features we have to know to use <select> element:
type is omitted - tag <select> has no attribute type. Tag <select> itself determine that here is must be choice from a set of elements.
name="states_of_us" - the <select> element must have attribute name. Attribute name is a name of variable to pass to a form-handler.
checked="checked" - Attribute checked set <option> is chosen at first.
value="ny" - you can use attribute value for tag <option>. You can omit attribute value for tag <option>. If you use <option value="ny">New York</option> then variable name from tag <select> will get value "ny". If you use <option>New York</option> then variable name from tag <select> will get value "New York".
size="3" - Attribute size of <select> element sets how many <option> elements will be shown. If attribute size is omitted then only 1 element will be shown.
multiple="multiple" - The multiple attribute is a boolean attribute. When present, it specifies that the user is allowed to enter more than one value in the <select> element. To mark option use combinations: CTRL-left mouse button and SHIFT-left mouse button.
Codes to set into the test page:
<form action="formdata.php" method="POST" name="form1">
<p><label>Name (max 32 chars): <input type="text" name="name1" size="32" maxlength="32" /></label></p>
<p><label>Password (max 6 chars): <input type="password" name="pas1" size="10" maxlength="6" /></label></p>
<p>Do you love America? :::::
<label>Yes<input type="radio" name="love_america" value="yes" checked="checked" /></label> ... or ...
<label>No<input type="radio" name="love_america" value="no" /></label>
</p>
<p>What states of US do you like?</p>
<p>
<label><input type="checkbox" name="ny" value="" />New York</label>
<label><input type="checkbox" name="florida" value="" checked="checked" />Florida</label>
<label><input type="checkbox" name="texas" value="" />Texas</label>
</p>
<p>What states of US do you like (choice using select)?</p>
<p>
<select name="states_of_us" size="3" multiple="multiple">
<option value="ny">New York</option>
<option value="florida" selected="selected">Florida</option>
<option value="texas">Texas</option>
</select>
</p>
</form>
So we have placed mentioned above things on our test webpage: article_016.html
← click to view, how it looks on this website...
article_016.zip
← download this webpage in zip archive to set on your website.
"1&1" - one of the largest web hosts in the world.
Register with one of the largest web hosts in the world.
Our broad product portfolio of domains, website packages, web hosting packages and high-end server solutions gives you plenty of choice.
Click Here → ↓
Happy new searching to you!
What to do and where to go?
USA2017.INUMO.RU :: main page. Somebody think about future. We make future today. Peace, freedom, happiness for everyone in USA and everywhere on the Earth in 2017.
Email to president of USA in 2017 :: don't hesitate to share your info with administrative staff of USA2017. Help us make world around better.
USA 2017. Search page. Search Box. :: What is search? Search is the activity of looking thoroughly in order to find something or someone. Life is searching and searching is a zest of our life. When you try to locate or discover, or try to establish the existence of something, use the search box on USA 2017.
HTML tutorial on USA 2017, main page. :: HTML is an ace of base of Internet. This HTML tutorial has been created for newcomers to let them quickly understand Internet basics. From other side, experienced users also will found some lessons to be useful. This HTML tutorial contains hundreds of HTML examples. Also there are built-in lab works to ease for users process of understanding how some opportunities are actual today.
Chess portal on USA2017. :: Chess is the best game over the world. Chess makes your brain work good and your soul feel happy. Chess is taught to children in schools around the world today. Many schools host chess clubs, and there are many scholastic tournaments specifically for children. Tournaments are held regularly in many countries, hosted by organizations such as the United States Chess Federation and the National Scholastic Chess Foundation. I don't think about chess as a sport, for me chess is an art.
Toggle numbers on left and right :: Click here if you want to remove or set back numbers on the left and right sides of your screen.
Remove ads :: Click here if you want to remove ads off this page.
Change ads :: Click here if you want to change ads on this page. After your click, all ads will be resorted by following way: ad1 → ad2, ad2 → ad3, ad3 → ad1.
If you plan to come back later...
Please remember this page -
URL: https://usa2017.inumo.ru/html/p016.html