02.get-post

<body>
    <form action="02.get-post.php" method="POST">
        <!-- form标签 可以提交到远程服务器  也可以提交到自己的服务器  写到 action属性里面 
         提交方式有两种 写在 method里面 一种是 get  另一种是 post-->
        <!-- 提交表单必须要有name属性 -->

        <!-- 如果是get请求 会将提交的数据接到URL后面  如下
        http://127.0.0.1/Ajax/02.get-post.php?username=yanglaxue&user_Pwd=123456
        如果是 post 请求会将提交的数据放到请求头中( 按f12键 Network 点击要看的页面 点击 Headers 
        拖到最后可以看到 输入的用户名 和密码) -->
        <input type="text" name="username"> <br>
        <input type="password" name="user_Pwd"> <br>
        <input type="submit" value="提交"> <br>
    </form>
</body>

 

posted @ 2021-01-12 14:40  闭上耳朵  阅读(47)  评论(0编辑  收藏  举报