HTML表单与输入实例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HTML表单与输入实例</title>
</head>
<body>
<p>
<a href="#C4">查看 Chapter 4。</a>
</p>
<form>
<h2>一、输入实例</h2>
<h3>1,文本域</h3>
姓名:
<input type="text" name="name">
<br>
年龄:
<input type="text" name="age">
<br>
<h3>2,密码</h3>
密码:
<input type="password" name="password">
<h3>3,复选框</h3>
bike:
<input type="checkbox" name="bike">
car:
<input type="checkbox" name="car">
<h3>4,单选框</h3>
男性:
<input type="radio" checked="checked" name="sex" value="male">
女性:
<input type="radio" name="sex" value="female">
<h3>5,下拉列表</h3>
<select name="car">
<option value="byd"> BYD </option>
<option value="bmw"> BMW </option>
<option value="audi" selected="selected"> AUDI </option>
<option value="benzi"> BENZI </option>
</select>
<h3>6,文本域</h3>
<textarea rows="3" cols="20"></textarea>
<h3>7,创建按钮</h3>
<input type="button" value="hello">
<h3>8,数据周围绘制一个带标题的框</h3>
<fieldset style="width: 100px;">
<legend>idCardInfo</legend>
身高:<input type="text">
体重:<input type="text">
</fieldset>
<h2>二、表单实例</h2>
<h3>1,带有输入框和确认按钮的表单</h3>
<form action="#">
用户名:
<input type="text" name="username">
密码:
<input type="password" name="password">
<input type="submit" value="submit">
</form>
</form>
<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>
</body>
</html>