Python-form表單標簽


語義:標記表單

復制代碼
#1、什么是表單?
    表單就是專門用來接收用戶輸入或采集用戶信息的

#2、表單的格式
    <form>
        <表單元素>
    </form>
復制代碼

鏈接:https://www.processon.com/view/link/5aeea789e4b084d6e4bf6911 

圖片:https://pan.baidu.com/s/1db6o--q557aKmtYJSBsyqA

在form內還可以添加一種標簽
<fieldset>添加邊框
    <legend>注冊頁面</legend>
    表單控件......
</fieldset>
<html>
    <head>
        <title>表單練習</title>
        <meta charset="utf-8"/>
    </head>
    <body>
        <form action="http://www.baidu.com">
            <fieldset>
                <legend>注冊頁面</legend>
                <p>
                    賬號:<input type="text" placeholder="請輸入你的用戶名" name="user">
                </p>

                <p>
                    密碼:<input type="password" placeholder="請輸入你的密碼" name="password">
                </p>

                <p>
                    性別:
                    <input type="radio" name="gender" value="male">男
                    <input type="radio" name="gender" value="female">女
                    <input type="radio" name="gender" checked="checked" value="none">保密
                </p>

                <p>
                    <!--注意點:單選框or復選框都需要指定相同的name值-->
                    愛好:
                    <input type="checkbox" name="sport" value="basketball">籃球
                    <input type="checkbox" name="sport" value="football">足球
                    <input type="checkbox" checked="checked" name="sport" value="crazy">足浴
                </p>

                <p>
                    簡介:
                    <textarea name="" id="" cols="30" rows="10" name="desc"></textarea>
                </p>

                <p>
                    生日:
                    <input type="date" name="birth">
                </p>

                <p>
                    郵箱:
                    <input type="email" name="email">
                </p>

                <p>
                    電話:
                    <input type="number" name="phone">
                </p>

                <p>
                    <input type="submit" value="注冊">    
                    <input type="reset" value="清空">
                </p>

            </fieldset>
        </form>

    </body>
</html>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM