HTML中<input>參數,以及文本輸入框,文本域的講解,

來源:互聯網
上載者:User

HTML中<input>參數,以及文本輸入框,文本域的講解,

<form>   <input type="text/password" name="名稱" value="文本" /></form>

1、type:

   當type="text"時,輸入框為文本輸入框;

   當type="password"時, 輸入框為密碼輸入框。

2、name:為文字框命名,以備背景程式ASP 、PHP使用。

3、value:為文本輸入框設定預設值。(一般起到提示作用)

文本域,支援多行文本輸入:

當使用者需要在表單中輸入大段文字時,需要用到文本輸入欄位。

文法:

<textarea  rows="行數" cols="列數">文本</textarea>
注意這兩個屬性可用css樣式的width和height來代替:col用width、row用height來代替。

舉例:

<form action="save.php" method="post" >    <label>簡歷:</label>    <textarea cols="50" rows="10">在這裡輸入內容...</textarea>    <input type="submit" value="確定"  name="submit" />    <input type="reset" value="重設"  name="reset" /></form>


聯繫我們

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