html中input標籤相關的屬性

來源:互聯網
上載者:User

標籤:

1. input標籤的type屬性

屬性 值 描述
type button 定義可點擊按鈕(多數情況下,用於通過 JavaScript 啟動指令碼)。
file 定義輸入欄位和 "瀏覽"按鈕,供檔案上傳。
checkbox 定義複選框。
hidden 定義隱藏的輸入欄位。
image 定義映像形式的提交按鈕。
password 定義密碼欄位。該欄位中的字元被掩碼。
radio 定義選項按鈕。
reset 定義重設按鈕。重設按鈕會清除表單中的所有資料。
submit 定義提交按鈕。提交按鈕會把表單資料發送到伺服器。
text 定義單行的輸入欄位,使用者可在其中輸入文本。預設寬度為 20 個字元。

 

 

 

 

 

 

 

 

 

 

 

 

 

2.input標籤的name屬性

屬性 值 描述
name field_name 定義input元素的名稱

 

 

 

3.input標籤的value

屬性 值 描述
value value 規定input元素的值

 

 

 

4.input標籤的width和height

屬性 值 描述
width
pixels% 定義 input 欄位的寬度。(適用於 type="image")
height pixels% 定義 input 欄位的高度。(適用於 type="image")

 

 

 

 

5.disabled和checked

屬性
值 描述
disabled
disabled 當 input 元素載入時禁用此元素。
checked checked 規定此 input 元素首次載入時應當被選中。

html中input標籤相關的屬性

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.