zoukankan      html  css  js  c++  java
  • Html from 标签

    Html from 标签

    <html>
    <body>
        <!-- form 提交表单设置 -->
        <form>
              <input type="text" />
              <input type="password" />
              <input type="button" value="登录"/>
        </form>
        
        <!-- action="http://xxx"指向后台发送的某个位置 -->
        <form action="http://xxx">
            <!-- name="xxx" 将输入框指定key引用使用 -->
            <input type="text" name="user"/>
            <input type="password" name="passwd"/>
            <input type="submit" value="登录"/>
        </form>
        
        <!-- method="POST"修改请求形式,默认GET -->
        <form action="http://xxx" method="POST">
                <input type="text" name="user"/>
                <input type="password" name="passwd"/>
                <input type="submit" value="登录"/>
        </form>
        
        <!-- enctype="application/x-www-form-urlencoded" 表示本地上传文件一点点发给服务器 -->
        <from enctype="application/x-www-form-urlencoded">
                <!-- type="file"上传文件、name="xxx" 标识后端处理的文件名 -->
                <input type="file" name="xxx">
        </from>
    </body>
    </html>
    GET形式:点击提交后,GET会把所有输入数据拼接到URL内在发送,请求体没有内容,将内容添加到URL内。
    POST形式:点击提交后,PSOT会把数据放在内容,将数据全部存放请求体内。
    
    注:区别在于数据存放的位置不同,体现形式不同,没有安全一说,抓包全部可见。
    GET与POST

    效果提交表单



  • 相关阅读:
    区块链:交易收发机制
    区块链:POA委员会选举机制
    区块链:POA区块生成机制
    区块链:最小可行区块链原理解析2
    基于 react 的Java web 应用—— 组件复用(后续需更新)
    struts2验证码
    struts2验证码
    struts2验证码
    struts2验证码
    axis2 411
  • 原文地址:https://www.cnblogs.com/xiangsikai/p/10402727.html
Copyright © 2011-2022 走看看