html5 知識點簡單總結03

來源:互聯網
上載者:User

標籤:檔案上傳   知識   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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.