<form>表單
<form action ="(處理表單數(shù)據(jù)的服務(wù)器的文件URL)" method ="POST"或"GET"> .... </form>
<input>表單元素
*文本框 *
<input type ="text" name ="xx">
單選框
<input type ="radio" name ="xxx" value ="aa"> <input type ="radio" name ="xxx" value ="bb"> .....
(加checked屬性表默認(rèn)選項(xiàng))
復(fù)選框
<input type ="checkbox" name ="xxx" value ="aaa"> <input type ="checkbox" name ="xxx" value ="bbb"> .....
(加checked屬性表默認(rèn)選項(xiàng),在name屬性值后加"[]",表可多選)
文本區(qū)
<textarea name="xxx" rows ="10" cols ="50">
選擇菜單
<select name ="xxx"> <option value ="aa">....</option> <option value ="bb">....</option> ... </select>
(加multiple屬性表多選菜單)
數(shù)字輸入
<input type ="number" min ="0" max ="10">
范圍輸入
<input type ="range" min ="10" max= "100" step ="5">
顏色輸入
<input type ="color">
日期輸入
<input type ="data">
email輸入
<input type ="email" >
url輸入
<input type ="url">
tel輸入
<input type ="tel">
文件輸入
<input type ="file" name ="doc">