表單作用:收集信息提交給服務(wù)器
表單需要用form標(biāo)簽包圍
<from action="提交到服務(wù)器地址" method="get/post"></from>
單選镊折,相同的name為一組
1組
<input type="radio" name="sex" value="man" >男
<input type="radio" name="sex" value="woman">女
2組
<input type="radio" name="sex1" value="man" >男
<input type="radio" name="sex1" value="woman">女
多選type="checkbox",<label> 標(biāo)簽包圍點(diǎn)文字也可以選擇
<label><input type="checkbox" name="" value="dota">dota</label>
<label><input type="checkbox" name="" value="旅游" checked>旅游</label>
<label><input type="checkbox" name="" value="寵物" checked>寵物</label>
密碼框寸宏,輸入顯示黑圓點(diǎn)
<input type="password" name="" placeholder="默認(rèn)顯示的文字">
單行文本框
<input type="text" name="" placeholder="默認(rèn)顯示的文字">
多行文本框
<textarea name="" cols="10" rows="5" >
默認(rèn)顯示的文本
</textarea>
下拉菜單欄
<select>
<option value="beijing">北京</option>
<option value="shanghai" selected>上海</option>
<option value="hangzhou">杭州</option>
</select>
隱藏域幕袱,檢驗(yàn)是否安全
<input type="hidden" name="" value="">
上傳文件
<input type="file" name="" accept="定義上傳文件類型">
按鈕
<button>提交</button>
<input type="buttom" value="按鈕">
<input type="submit" value="提交">
<input type="reset" value="重置">