HTML表單與輸入

來源:互聯網
上載者:User

標籤:

如下:

1.文本域(Textfields)
2.密碼域
3.複選域
4.選項按鈕
5.下拉式清單
6.文本域(Textarea)
7.Fieldset around data
8.表單,提交按鈕,重設按鈕,普通按鈕
輸入表單:<input type="" name="" value=""/>
類型:text文本、checkbox複選框、radio單選框、button普通按鈕
    submit提交當前表單按鈕、reset重設當前表單按鈕
下拉式清單:<select name=""></select>
下拉選項:<option value=""></option>
預設選中項selected
下拉選項組<optgroup label=""></optgroup>
<textarea rows="" cols=""></textarea>文本域,一個大框
<fieldset><legend></legend></fieldset>將表單內的相關元素分組,legend為分組的標題
<form action=""></form>表單

代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title></head><body>    <h1>個人資訊表</h1>    <form action="">    <fieldset>    <legend>帳號密碼輸入區</legend>    姓名:<input type="text" name="username"/>    密碼:<input type="password" name="psw"/>    </fieldset>    <br/>    愛好:<input type="checkbox" name="like" value="sing"/>唱歌            <input type="checkbox" name="like" value="sleep"/>睡覺            <input type="checkbox" name="like" value="xo"/>泡妞    <br/>    性別:<input type="radio" name="sex" value="GG"/>帥哥        <input type="radio" name="sex" value="MM"/>美女    城市:    <select name="city">        <option value="bj">北京</option>        <option value="sh" selected="selected">上海市</option>        <option value="tj">天津</option>        <optgroup label="廣東省">            <option value="gz">廣州市</option>            <option value="sz">深圳</option>        </optgroup>    </select>    <br/>    <textarea rows="10" cols="40">請輸入你的自我介紹資訊。。。    </textarea>    <br/>    <input type="button" value="普通按鈕"/>    <input type="submit" value="提交按鈕"/>    <input type="reset" value="重設按鈕" />    </form>    </body></html>

 

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.