html-表單標籤

來源:互聯網
上載者:User

標籤:

<html>    <head>        <title>表單標籤</title>        <meta http-equiv="content-type" content="text/html;charset=utf-8">    </head>    <body>        <!--  from 用來標識表單範圍                 action:確定提交的位置                input:                             type:確定提交的類型                            name:提交的索引值                            size:文本輸入框的顯示長度        text            password                            maxlenth:顯示文本輸入框的長度        text        password                            readonly:唯讀,不修改文字框的長度,會提交        text        password                            disable:禁用,被禁用的表單項不會被提交        text        password (所有的input類型都可以生效)                                            select:                            multiple:多選                            size:選項長度                            disable: 禁用                                            textarea:                            disable:禁用                            readonly:唯讀                                            form:                            action:表單提交的地址(ps:#代表本地提交)                            methon:提交的方式                                        get提交:                                                    1、把索引值參數添加在url地址後面                                                    2、安全性較差                                                    3、受制於瀏覽器地址欄長度限制                                        post提交:                                                    1、參數不在url上                                                    2、安全性相對較好                                                    3、理論上參數長度沒有限制                                                                                        -->        <form action="#"  >        name: <input type="text"   name="username"     /><br>        密碼:<input type="password"  name="password" /><br>        性別:男:<input type="radio"  name="sex" value="male"/> 女:<input type="radio" name="sex" value="famale" /><br/>        愛好:抽煙:<input type="checkbox" name="habit" value="smork" />                    喝酒:<input type="checkbox" name="babit" value="drink"  /><br>        學曆:<select name="edu">                            <option value="zk">專科</option>                            <option value="bk">本科</option>                            <option value="yjs">研究生</option>                    </select><br>        個人說明:<textarea rows="10" cols="75"  name="docs" >這傢伙就這樣了</textarea><br>        近照:<input type="file" name="file"  value="選擇"/><br>                    <input type="hidden" name="hit" />             <input type="submit"  value="提交"/>            <input type="reset"  value="重設"/>        </form>    </body></html>

總結:1、標籤式語言表述介面。跟javase中的swing很類似。eg:radio、checkbox 等等。不同的是,下拉式清單中用的是select標籤。

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.