web前端 html基礎2

來源:互聯網
上載者:User

標籤:inpu   style   --   res   前端   set   bsp   js使用   log   

表單標籤<form></form>

input系欄標籤 

  text 文本輸入框

  placeholder 預設的屬性,輸入時消失

  password 密碼輸入框

  radio 單選框

  checkbox 多選框

  submit 提交按鈕

  button 按鈕(需要配合js使用.) button和submit的區別?

  file 提交檔案:form表單需要加上屬性enctype="multipart/form-data"

select標籤

textarea多行文字框

label標籤

fieldset標籤

<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>register</title></head><body><h2>註冊頁面</h2><form action="/index/" method="post">    <p>            <label for=“user”>使用者:</label>       <!--label標籤的作用,跟下面的“密碼:”一樣-->        <input type="text" name="user" value="egon">    </p>    <p>密碼:<input type="password" name="pwd" value="123"></p>    <p>愛好:<input type="checkbox" name="hobby" value="bastball">籃球            <input type="checkbox" name="hobby" value="football" checked="checked">足球  <!--checked="checked" 預設-->            <input type="checkbox" name="hobby" value="pingpang">乒乓球    </p>    <p>性別:        <input type="radio" name="sex" value="1" checked="checked">男        <input type="radio" name="sex" value="0">女    </p>    <p>        <select name="籍貫">            <option value="hebei" selected="selected">河北省</option>  <!--selected="selected" 預設-->            <option value="hebei" >河南省</option>            <option value="hebei">湖南省</option>            <option value="hebei">湖北省</option>        </select>    </p>    <p>        <input type="reset">    </p>    <p>        <input type="button" value="按鈕">    </p>    <p>        <input type="file">    </p>    <fieldset>        <legend>登入吧</legend>        <input type="text">    </fieldset>    <input type="submit" value="提交"></form></body></html>

 

web前端 html基礎2

相關文章

聯繫我們

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