<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<!--
表單標籤:表單標籤的作用是用於提交數據給服務器的。
表單標籤的根標籤是<form>標籤
常用的屬性:
action:該屬性是用於指定提交數據的地址。
method: 指定表單的提交方式
get:默認使用的提交方式 提交的數據會顯示在地址欄上
post:提交的數據不會顯示在地址欄上
注意:表單項的數據如果需要提交到服務器上面,那麼表單項必須要有name的屬性值
-->
</head>
<body>
<form action="http://www.baidu.com" method="post">
<!--文本輸入框 單行-->
用戶名:<input type="text" /><br/>
<!--密碼框-->
密碼:<input type="password" /><br/>
<!--單選框-->
性別:男<input checked="true" value="man" name="sex" type="radio" /> 女<input name="sex" value="woman" type="radio" /><br />
<!--下拉框-->
來自的城市:<select name="city">
<option value="BJ">北京</option>
<option value="SH">上海</option>
<option>廣州</option>
<option selected="selected">深圳</option>
</select><br />
<!--複選框 同一組的複選框name的屬性值要一致-->
興趣愛好:java<input checked="checked" type="checkbox" />
c#<input type="checkbox" />
php<input type="checkbox" />
<br />
<!--文件上傳框-->
大頭照:<input type="file" /><br />
個人簡介:
<!--文本域-->
<textarea rows="5" cols="10">
</textarea> <br />
<!--提交按鈕-->
<input type="submit" value="註冊" />
<!--重置按鈕-->
<input type="reset" value="重置" />
</form>
</body>
</html>