表单标签要写在<form></form>标签内,要不提交不出去,提交到action=""所写的地址。
<form action="">
姓名<input type="text"/><br> 普通文本框(text)
密码<input type="password"/><br/> 密码框(password)
性别<input type="radio" name="a"/>男 单选框(radio)
<input type="radio" name="a"/>女 <br/>
爱好 <input type="checkbox" name="b"/>看书 多选框(checkbox)
<input type="checkbox" name="b"/>听歌
<input type="checkbox" name="b"/>跳舞<br/>
文件<input type="file"/><br/>
生日<input type="date"/><br/> 年 月 日(date)
<input type="datetime-local"/><br/> 年 月 日 时 分(datetime-local)
<input type="month"/><br/> 年 月(month)
<input type="time"/><br/> 时 分(time)
<input type="week"/><br/> 周(week)
城市<select> 下拉列表标签
<option>选项一</option> 下拉内容标签
<option>选项二</option>
<option>选项三</option>
</select><br/>
进度<input type="range" name="ran" min="1" max="10"/><br/> 取值,进度条(range)
取值<input type="number" min="1" max="10"/><br/> 取值,以文本框的形式(number)
邮箱:<input type="email"/>
邮箱:<input type="hidden"/> 隐藏(hidden)
协议:<br/>
<textarea cols="40" rows="20" readonly="readonly"> 只读(readonly)rows 占多少行 , 行多了控制高度,cols占多少列, 列多了就控制宽度
请遵守...
</textarea><br/> 自定义文本域(textarea)
<input type="checkbox"/><br/>我同意
<input type="submit"/> 提交按钮,提交数据使用的按钮(submit)
<input type="reset" disabled="disabled"/> 重置按钮(reset)禁用(disabled)
<input type="bu" value="普通按钮"/> 普通按钮
</form>