zoukankan      html  css  js  c++  java
  • 表单

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>form</title>
    </head>
    <body>
    <!--     * 使用form标签制作表单 
                 * 使用input标签制作表单项
                     * type:表单项类型
                         * text:文本框
                         * password:密码框
                         * reset:重置
                         * submit:提交
                     * name:名称,有name属性,才可以提交数据到目标位置
                     * value:值(默认的值在单元格或者在表单中)text|password默认值,sumbit按钮的文本值
                     * checked:默认选中(radio|checkbox)
                 * 使用select option制作表单项
                 * action属性:表单提交的路径(位置)
                 * method属性:表单提交方式
                     * get
                     * post
              -->
    
        <form action="success.html" method="post">
            用户名:<input type="text" name="username"/><br/><br/>
            密码:<input type="password" name="pwd"/><br/><br/>
            
            性别:<input type="radio" name="gender" value="man" /><input type="radio" name="gender" value="woman" checked="checked"/><br/><br/>
                  
             爱好:<input type="checkbox" name="hobby" value="basketball" />篮球
                  <input type="checkbox" name="hobby" value="football"/>足球
                  <input type="checkbox" name="hobby" value="volleyball" checked="checked"/>排球
                  <br/><br/>
                  
        喜欢的明星:<select name="star">
                    <option value="fbb">范冰冰</option>
                    <option value="zy">杨颖</option>
                    <option value="zzy">章子怡</option>
                 </select>
                 
                 <br/>
                 <br/>
            <input type="reset">
            <input type="submit">
        </form>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>form空白</title>
    </head>
    <body>
        <h1>登录</h1>
        <form action="success.html">
            用户名:<input type="text" name="username"><br>&emsp;码:<input type="password" name="pwd"><br>
            <input type="reset">
            <input type="submit" value="登录">
        </form>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>form空白</title>
    </head>
    <body>
        <h1>注册</h1>
        <form action="success.html">
            用户名:<input type="text" name="username"><br>&emsp;码:<input type="password" name="pwd"><br>&emsp;别:<input type="radio" name="gender" value="男"><input type="radio" name="gender" value="女"><br>&emsp;好:
                    <input type="checkbox" name="like" value="爬山">爬山
                    <input type="checkbox" name="like" value="象棋">象棋
                    <input type="checkbox" name="like" value="reading">reading
            <br>
            喜欢的明星:
                <select name="star">
                    <option value="lls">刘老师</option>(有value值时提交value值没有value值时提交后面的值)
                    <option value="sls">沙老师</option>
                    <option value="cls">苍老师</option>
                </select>
            <br>
            <input type="reset">
            <input type="submit" value="注册">
        </form>
    </body>
    </html>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>目标页面</title>
    </head>
    <body>
    <h1>表单提交成功!</h1>
    </body>
    </html>

  • 相关阅读:
    容器的发展历程
    oracle数据库删除了表空间后连接数据库提示ORA-01033:ORACLE initialization or shutdown
    Oracle数据库忘记用户名和密码怎么办
    maven项目pom文件引入本地jar包并打包的配置
    Java 9 新特性,看这里就明白了
    springboot项目统一处理返回报文体
    在springboot中用实体类获取配置文件的属性值
    2017《面向对象程序设计》寒假作业二
    css 绝对定位元素居中显示
    js防抖
  • 原文地址:https://www.cnblogs.com/xp20170618/p/13891830.html
Copyright © 2011-2022 走看看