表单:
表单是一个包含表单元素的区域。
表单元素是允许用户在表单中输入内容,比如:文本域(textarea)、下拉列表、单选框(radio-buttons)、复选框(checkboxes)等等。
表单使用表单标签 <form> 来设置
<form>
.
input 元素
.
</form>
文本域(Text Fields)
文本域通过<input type="text"> 标签来设定,当用户要在表单中键入字母、数字等内容时,就会用到文本域。
例如:
<label for="name">姓名:</label>
<input id="name" name="name" type="text" value="蔡徐坤" maxlength="6"/>
密码字段
密码字段通过标签<input type="password"> 来定义:
<label for="pwd">密码:</label>
<input id="pwd" name="pwd" type="password" value="7112" maxlength="13"/>
单选按钮(Radio Buttons)
<input type="radio"> 标签定义了表单单选框选项
<label for="sex">性别:</label>
<input id="sex" name="sex" type="radio" value="男" />男
复选框(Checkboxes)
<input type="checkbox"> 定义了复选框. 用户需要从若干给定的选择中选取一个或若干选项。
<label for="fav">喜欢:</label>
<input id&