~~~
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>注冊</title>
</head>
<body>
<!--
form中的標記 別名 控件
input type="text" type="password" textarea readonly maxlength限定輸入字符個數
-->
<form action="http://www.baidu.com">
<input type="text" name="username" placeholder="用戶名" maxlength="10"/><br />
<input type="password" name="pwd" placeholder="密碼" /><br />
<input type="password" name="pwd2" placeholder="確認密碼" /><br />
生日<br />
<input type="date" name="birthday" /><br />
<!--
一組相關的radio, 必須有相同的name屬性
以下屬性,特殊,瀏覽器只關心屬性名,不關心屬性值,可以只寫屬性名
controls = "controls"
autoplay="autoplay"
checked
value: 表單提交時的值
-->
<input type="radio" name="sex" value="男" checked/> 男
<input type="radio" name="sex" value="女"/> 女
<br />
學歷
<br />
<!--
select, 默認第一個option是選中項
option selected 設置默認選中項
option如果設置了value, 提交的是option的value值
如果沒有設置value, 提交的是option標記中間的文本(option的text)
multiple="multiple" 設置多選
-->
<select name="education">
<option value="1">本科</option>
<option value="2" selected>研究生</option>
<option value="3">博士</option>
</select>
<br />
興趣愛好:
<br />
<!--
一組相關的checkbox, 要有相同的name
-->
<input type="checkbox" name="hobby" checked="" value="看書"/> 看書
<input type="checkbox" name="hobby" checked="" value="學習"/> 學習
<input type="checkbox" name="hobby" checked="" value="編程"/> 編程
<!--
頭像 type=file
-->
<br />
<!--<input type="file" name="upload" />-->
<!--
多行文本框
textarea
rows:行數 高度
cols:列數 寬度
textarea標記中間的內容為默認值
-->
備注:
<br />
<textarea name="comment" rows="6" cols="30">這個人很懶,什么也沒有留下</textarea>
<!--
input type="submit" 提交按鈕, 外部一定有表單
input type="reset" 重置按鈕,外部一定有表單
input type="button" 普通按鈕,外部可以沒有表單 配置javascript(js)
-->
<br />
<!--
button:可以使用圖片作為按鈕的名稱
button比input更具有語義性
input button disabled 不可用
-->
<input type="submit" value="注冊" disabled=""/>
<input type="reset" value="重置" />
<input type="button" value="點我" />
<button type="submit" disabled=""><img src="img/MV.png"/></button>
<button type="reset">重置</button>
<button type="button">點我</button>
</form>
</body>
</html>
~~~