首页 > 代码库 > 表单应用举例

表单应用举例

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            
            div{
                width: 600px;
                height: 700px;
                background-color:#f7b497 ;
                border-style: solid;
                margin-top: 30px;
            }
            .div1{
                border-style: solid;
            }
            /*body{
                background-image: url(C:\Users\lan\Desktop\html\HTML_demo\2.jpg);
            }*/
        </style>
    </head>
    <body>
        <center>
            <div class="div1">
                <h1><center>welcome to my private web</center></h1>
        <form method="post" action="http://www.sogou.com/web">
            <center>
            <p>邮箱 &nbsp; <input type="text" name="query"></p>
            <p>用户名&nbsp;<input type="text" name="email"><br/></p>
            <p>密码 &nbsp; <input type="password" name="pwd"></p>
            <p>确认密码<input type="password" name="pwd"></p>
            验证码。。。
            <p>选择语言种类(问题1多选)</p>
            <p>
                python<input type="checkbox" nname="hobby" value="http://www.mamicode.com/1">
                java<input type="checkbox" nname="hobby" value="http://www.mamicode.com/2">
                c<input type="checkbox" nname="hobby" value="http://www.mamicode.com/3">
                c#<input type="checkbox" nname="hobby" value="http://www.mamicode.com/4">
                c++<input type="checkbox" nname="hobby" value="http://www.mamicode.com/5">
            </p>
            <p>单选
                男<input type="radio" name="sex" value="http://www.mamicode.com/1" />
                女<input type="radio" name="sex" value="http://www.mamicode.com/2" />
            </p>
            <p>下拉菜单
                <select name="menu">
                    <option value="http://www.mamicode.com/1">董事长</option>
                    <option value="http://www.mamicode.com/2">助理</option>
                    <option value="http://www.mamicode.com/3">CEO</option>
                    <option value="http://www.mamicode.com/4">CTO</option>
                    <option value="http://www.mamicode.com/5">总监</option>
                    <option value="http://www.mamicode.com/6">经理</option>
                    <option value="http://www.mamicode.com/7" selected="selected">职员</option>
                </select>
                
            </p>
            <p>备注
                <textarea name="qq" rows="10" cols="55">
                    
                </textarea>
            </p>
            <input type="submit" value="http://www.mamicode.com/提交">
            </center>
        </form>
            </div>
        </center>
    </body>
</html>

引用自我当道士那儿些年的博客

表单应用举例