html部分---表單;

來源:互聯網
上載者:User

標籤:不同   nbsp   image   資料   pos   input   下拉式清單   log   ado   

<form action="aa.html" method="post/get">

/*action的作用是提交到..,methed是提交方法,用post地址不顯示頁面中表單name內容,用get地址顯示提交的name的內容*/

 

屬性

/*除了按鈕之外必須要寫name屬性*/
/*按鈕類的表單必須要寫value*/

disabled="disabled" 不可用,也不提交;
hidden="hidden" 隱藏
readonly="readonly" 表示唯讀,不可寫;
checked="checked" 用在單選複選裡,表示預設選中;
selected="selected" 用在下拉式清單,表示預設選中;

/*文字框*/

文字框<input type="text" name="yhm" value="hello"/><br />密碼<input type="password" name="mm" value="123"/><br />隱藏欄位<input type="hidden" name="yc" value="qq"/><br />文本域<textarea cols="30" rows="9"></textarea>/*30個字元,9行*/<br />

/*按鈕類*/

提交按鈕<input type="submit" value="提交"/><br />/*提交按鈕,按鈕會提交當前頁面所有資料,有限提交表單中的value,如果沒有,則提交標籤後的文字,提交到aa.html,用post的方法提交*/重設按鈕<input type="reset" value="重設"/><br />/*把當前頁面重設*/圖片按鈕<input type="image" src="psb.jpg" width="60" height="60" value="tupian"><br />/*也屬於提交按鈕,可以把當前頁面提交到aa。html*/普通按鈕<input type="button" value="普通"><br>

/*選擇類*/

單選<input type="radio" name="sex"/>男<br /><input type="radio" name="sex"/>女<br />/*name值相同是相同,不同是多選*/複選<input type="checkbox" name="aihao"/>音樂<br /><input type="checkbox" name="aihao"/>體育<br /><input type="checkbox" name="aihao"/>學習<br />選擇<select name="民族" size="1" ><option value="001">漢族</option><br /><option value="002">朝鮮族</option><br /><option value="003">滿族</option><br /></select>

檔案

<input type="file"/>

 

html部分---表單;

聯繫我們

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