form B for 2.2 HTML Web pages

Keywords: html5 Javascript

form B for 2.2.2 HTML Web pages

Description: Form form
1. In the form form form, use the HTML version 4 tag
Text box, password box, radio button, multi-selection button, drop-down list box, multi-line text file upload, submit button, reset button, ordinary button

2. In the form form form, use the HTML5 version tag
The new features of H5 are mainly introduced.
Date date number color mailbox email@

3. Notes
3.1 Radio Button - Requirements: type radio name must have the same name
3.2 Default Options
Radio Button Multiple Selection Button - checked= "checked"
If there are no special settings in the drop-down list box, the first option is displayed by default.
selected="selected"
3.3 About Buttons
The submit button and the reset button must be used in conjunction with the form form. If they are used separately, the two buttons are invalid!
Ordinary button, use place, can be used anywhere!
It must be used in conjunction with this javascript event!
onclick - click event
New Characteristics of 3.4 H5
Type type, from the original text to the corresponding data type, such as number color email, etc.
With regard to mailboxes, you must combine this form form with the submit button.

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<form action="" method="get">
			<!--Textbox-->
			Account number:<input type="text" name="username" id="" value="" /><br />
			<!--Password box-->
			Password:<input type="password" name="pwd" id="" value=""/><br />
			<!--radio button-->
			Gender: <input type="radio" name="sex" id="" value="1" checked="checked" />male
			     <input type="radio" name="sex" id="" value="0" />female
			<p>
				<!--Checkbox-->
				hobby:<input type="checkbox" name="hobby" id="" value="study"  checked="checked"/> Study
				    <input type="checkbox" name="hobby" id="" value="game" checked="checked"/> Game
				    <input type="checkbox" name="hobby" id="" value="sleep"/> Sleep
			</p>
			<p>
				<!--Dropdown list box-->
				Native place:<select>
					    <option>---Please choose the province---</option>
					    <option>Xie</option>
					    <option selected="selected">Xie</option>
					    <option>Xie</option>
					    <option>Henan</option>
					    <option>Xie</option>  
				    </select>
			</p>
			<p>
				<!--Multiline text-->
				Self introduction.:<textarea cols="20" rows="10"></textarea>
			</p>
			<!--File upload-->
			<p>
				Picture upload:<input type="file" name="" id="" />
			</p>
			<!--Button-->
			<p>
				<input type="submit" name="" id="" value="Submission" />
				<input type="reset" name="" id="" value="Reset" />
				<input type="button" name="" id="" value="General button" onclick="alert('Tao Huijie is the most beautiful, no matter she is the most beautiful!')" />
				
			</p>
		</form>
	</body>
</html>

Posted by samuraitux on Tue, 01 Oct 2019 20:02:33 -0700