標籤:style blog io color ar os sp for 資料
<form action="processorder.php" method="post"><table border="0"><tr bgcolor="#cccccc"> <td width="150">Item</td> <td width="15">Quantity</td></tr><tr> <td>Tires</td> <td align="center"><input type="text" name="tireqty" size="3" maxlength="3" /></td></tr><tr> <td>Oil</td> <td align="center"><input type="text" name="oilqty" size="3" maxlength="3" /></td></tr><tr> <td>Spark Plugs</td> <td align="center"><input type="text" name="sparkqty" size="3" maxlength="3" /></td></tr><tr> <td>How did you find Bob‘s?</td> <td><select name="find"> <option value = "a">I‘m a regular customer</option> <option value = "b">TV advertising</option> <option value = "c">Phone directory</option> <option value = "d">Word of mouth</option> </select> </td></tr><tr> <td colspan="2" align="center"><input type="submit" value="Submit Order" /></td></tr></table></form>
<form> 標籤用於為使用者輸入建立 HTML 表單。表單能夠包含 input 元素,比如文字欄位、複選框、單選框、提交按鈕等等。表單用於向伺服器傳輸資料。
<input> 標籤用於搜集使用者資訊。根據不同的 type 屬性值,輸入欄位擁有很多種形式。輸入欄位可以是文字欄位、複選框、掩碼後的文本控制項、選項按鈕、按鈕等等。
<table border="0"><tr> <td...>xxx</td> <td...>xxx</td></tr><tr>...</tr>...</table>
table定義表格,tr 元素定義表格行,th 元素定義表頭,td 元素定義表格單元。
HTML&PHP學習筆記(1)