標籤:檔案上傳 知識 checked 對齊 地址 提交 cal 儲存格 垂直置中
table表格
----基本結構
table預設無邊框(border)
<table border="數值">
<tr>
<th>表頭</th>
<th>表頭</th>
</tr>
<tr>
<td>儲存格</td>
<td>儲存格</td>
</tr>
</table>
table的屬性
邊框 border = "數值"
儲存格之間的間距 cellspacing="數值"
內容到儲存格邊框的距離 cellpadding="數值"
th 預設樣式 加粗 水平置中 垂直置中
td 預設樣式 水平靠左對齊 垂直置中 style="text-align:center" align="center" (淘汰)
水平對齊:left(靠左對齊)、center(置中對齊)、right(靠右對齊)
--------合併儲存格
1.行合并 上下合併儲存格 屬性 rowspan="合并的行數"
2.列合并 左右合併儲存格 屬性 colspan="合并的列數"
==================================
form表單
method 提交的方法
1.get 不安全 大小有限制
2.2.post 安全 大小不受限制
<form action="表單要提交的伺服器的頁面地址" method="get或者post">
<input type="text" name="自己起的名字" value="" / >
</form>
<Label ><input type="text" name="自己起的名字" value="" / >
</form></Label>
或
<Label for=”666” ><input type="text" name="自己起的名字" value="" id=”666”/ >
</form></Label>
Label 有 for 就一定用id
點擊文字即可選中文字框
input 屬性type值:
1.text 文字框
2.password 密碼框
3.radio 單選框 一組裡的name必須是同一個值 預設被選中 給input標籤加checked="checked" 或者 直接加checked
4.checkbox 複選框 預設被選中 給input標籤加checked="checked" 或者 直接加checked
5.submit 提交按鈕 value值記得加上
6.reset 重設按鈕
7.button 一般按鈕
8.hidden 隱藏欄位
9.file 檔案上傳框
屬性 placeholder=”預設顯示,滑鼠點擊會消失”
一般按鈕 <button>普通按鈕</button> type設為submit 或 reset 必須在form 表單裡 否則無效
屬性 disabled=”disabled” 表示按鈕不可用 也可用於其他表單
文本域(多行文字框)
<textarea cols="列數" rows="行數">
</textarea>
實現文字在多行文字框左上 用 vertical-align=”top”; middle(中間) bottom(底部)
下拉選項框(下拉式清單)
<select>
<option value="值">內容</option>
<option value="值" selected>內容</option>
....
</select>
預設選中 selected=”selected”
html5 知識點簡單總結03